2
votes

I have an application that uses SQL Server Report viewer that shows some server reports. I am able to run the Aspx application and see the reports while the application is debugged under Visual Studio. But when i published the webapplication and tried to see the reports, the report control wont render the report data. I can see only the filter portion of the report control and the ViewReport Button. Once I click the button a postback happens and every filters applied gets reset.

I am able to view the report through the report manager of the Report Server too. I wonder what is blocking the report viewer when i host the application to a server.

I am using IIS 6.0, SQLServer 2005, Visual Studio 2005 (ASP 2.0) and Report Viewer 8.0

Following is the code which I use in my page

protected void Page_Load(object sender, EventArgs e)
    {
  string svrRep = ConfigurationManager.AppSettings["ReportServerURI"].ToString();
        this.rptViewer.ServerReport.ReportServerUrl = new Uri(svrRep);

        if (!Page.IsPostBack)
        {

            this.rptViewer.ServerReport.ReportPath = "/MyReportFolder/My_Report";
        }
}

This is the markup for report viewer

<div style="width: 1095px; height:600px">        
     <rsweb:ReportViewer ID="rptViewer" runat="server" Font-Names="Arial" Font-Size="8pt"  SizeToReportContent="true"
                            Height="100%" ProcessingMode="Remote" Width="100%" BackColor="Silver" BorderColor="#666666"  >
                            <ServerReport ReportServerUrl=""   />
                        </rsweb:ReportViewer>
    </div>

Anyone please help me to resolve this issue.

2

2 Answers

0
votes

Maybe setting the Reportserver resets the control, try moving these lines inside the

(!Page.IsPostBack)

brackets.

0
votes

I had the same issue where the report would not display data (showing 0 of 0 pages).

I found the solution here:

Report Viewer Control not displaying data when deployed IIS7

I followed the instructions to install the redistributable and add the handling mapping and it worked.

Hope this helps someone else.