This is a migrated thread and some comments may be shown as answers.

ReportViewer rendering issue in a Sharepoint Webpart

3 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
dmetge
Top achievements
Rank 1
dmetge asked on 05 Oct 2010, 10:24 AM
Hi,

we're facing an issue, trying to display a reportviewer in a customized Webpart designed for a Sharepoint Application. I've tried to search in the forum and the KB for a couple of hours about this problem and found nothing.

Of course, we first checked everything mentionned in the "Deploying Web ReportViewer in MOSS" article, and everything is fine.
The reportviewer has a strange behaviour, when the page is loading, its toolbar starts appearing with its coloured and enabled icons, but then suddenly the icons turns gray and the toolbar is entierely disabled, as shown in the screenshot below. The report is empty.

Here are parts of the code we used. We declare the ReportViewer in the CreateChildControls method of the webpart, but we populate the data and generate the report in the RenderControl method.

 

protected Telerik.ReportViewer.WebForms.ReportViewer MyReportViewer;

 


 

protected override void CreateChildControls()

 

{

MyReportViewer =

new ReportViewer();

 

MyReportViewer.ParametersAreaVisible =

false; // Tried this but nothing changed

 

Controls.Add(MyReportViewer);

}

 

protected override void Render(HtmlTextWriter output)

 

{

 

EnsureChildControls();

 

 

var LObjetDataSource = new Telerik.Reporting.ObjectDataSource();

 

LObjetDataSource.DataSource = PopulateDataView(); // Method returning the data in a DataView

Telerik.Reporting.

Report Rapport = new Report();

 

Rapport.DataSource = LObjetDataSource;

Rapport.ReportParameters.Clear();

// Tried this in order to avoid bad parameters issues

 

 

 

MyReportViewer.Report = Rapport;

MyReportViewer.RenderControl(output);

}


Could the issue be relative to a bad databinding, in the lifecycle of the page/webpart ?
If someone can help...

thanks in advance.

Daniel 

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Oct 2010, 04:30 PM
Hello dmetge,

Try adding ID to the report viewer e.g.:

MyReportViewer = new ReportViewer();
MyReportViewer.ID = "myViewer1";

Additionally this problem should not be present if you're using Q2 2010 or later version.

All the best,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
dmetge
Top achievements
Rank 1
answered on 05 Oct 2010, 06:25 PM
Thanks Steve,

Alas I've just did what you suggested and nothing has changed (in fact we're using Q2 2010 version).

If you have another idea...

Thanks in advance,

Daniel
0
Steve
Telerik team
answered on 08 Oct 2010, 01:14 PM
Hello dmetge,

Try using a tool like Firebug to see the markup generated on the page. We have a suspicion that this is a browser related problem that might be caused by document type. Things to try:
  • set explicit height and width to the viewer in pixels.
  • try opening the page in another browser. Btw what is the browser you're currently using? Have you tried compatibility mode?
  • remove the doctype from the page or master page hosting the control with the viewer.

Greetings,
Steve
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
dmetge
Top achievements
Rank 1
Answers by
Steve
Telerik team
dmetge
Top achievements
Rank 1
Share this question
or