I created my own control (window form with report viewer). I have the following code to download a local report:
Contained in the CustomReportViewer Class
//Load local report this.reportViewer1.ProcessingMode = ProcessingMode.Local; //enable loading of external images this.reportViewer1.LocalReport.EnableExternalImages = true; //pass the report to the viewer using (FileStream stream = new FileStream(filename, FileMode.Open)) { this.reportViewer1.LocalReport.LoadReportDefinition(stream); }
I invoke this using:
CustomReportViewer reportViewer = new CustomReportViewer();
This works fine and a window form appears containing the report viewer , but . I get the following message:
A data source instance has not been supplied for the data source "ReportData"
I'm not quite sure how to set up a data source? The necessary data is stored in a remote database ... what do I need to do to establish this connection?
user559142
source share