Click here to Skip to main content
15,906,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made an rdl report which uses a view and I can call that report successfully in remote mode. When I set the report viewer to local mode and attach my own dataset (made from the same view) the report viewer control shows nothing (there is just white space)

Any suggestions? (this is SQL 2008 and Visual Studio 2008)

This is the remote mode which works...
C#
rv.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
 rv.ServerReport.ReportServerUrl = new System.Uri("http://myserver/ReportServer");
 rv.ServerReport.ReportPath = "/Test1/JobTest2";
 rv.ServerReport.Refresh();

This is the local mode which shows nothing...
C#
rv.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
 rv.ServerReport.ReportServerUrl = new System.Uri("http://myserver/ReportServer");
 rv.ServerReport.ReportPath = "/Test1/JobTest2";
 ReportDataSource rds = new ReportDataSource();
 rds.Name = "rpv_Job";
 rds.Value = dstGetJobData().Tables[0];
 rv.LocalReport.DataSources.Clear();
 rv.LocalReport.DataSources.Add(rds);
 rv.DataBind();
 rv.LocalReport.Refresh();
Posted
Updated 20-Jul-10 6:00am
v3

1 solution

Hi,
I'm using just the following lines of code:

MIDL
rptView.LocalReport.DataSources.Clear();
            rptView.LocalReport.DataSources.Add(ds);
            rptView.LocalReport.Refresh();


and this is from the page design
MSIL
<rsweb:ReportViewer ID="rptView" runat="server" Width="9.25in" Visible="False">
        <localreport reportpath="Reports\User_Monthly_Report.rdlc">
        </localreport>
    </rsweb:ReportViewer>



Maybe you should set the path to local report also, and also check if the datasource name is corect (like the one in report definition).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900