Using the same ReportViewer control for multiple reports.
Using local reports in winforms app. I have a main form and then another form specifically for reports that contains only a Reportviewer control. I have a couple of rdlc files and if I configure the Reportviewer at design time it works for the report that I configure it for. But if I set the ReportEmbeddedResource or ReportPath to a different report I get the following error:
A data source instance has not been supplied for the data source 'PhonesDataSet_PhoneDbView'.
The reports use the same dataset but different tables. Both BindingSources and TableAdapters are added to the reports form. Any suggestions appreciated ...
Also, for the printing problems there was a KB 916812 mentioned in the forum and I can't access it. Does everyone that has a need to print reports have to call Microsoft support? What is the status of the printing bugs?
At runtime, you can call ReportViewer.LocalReport.GetDataSourceNames() to retrieve a list of the datasources that need to be supplied. This should provide some indication of what is wrong.
As far as printing, the fix will ship with Visual Studio 2005 SP1 (see http://msdn.microsoft.com/vstudio/support/servicing/default.aspx). If you need the fix sooner, it is available from Microsoft support.
I did check that out and there was only one data source listed. I was able to add the other data source at runtime and that part is working.
As for getting help from Microsoft support on the printing issue I've been working with them for the last 3 days. I've worked with 3 different people and have been routed around, on and off the phone for numerous hours. I got the (2) hot fixes and the one related to KB 916812 worked meaning the print dialog got the focus correctly. The hot fix for KB 917766 wouldn't install and I had to open an incident and the support person couldn't get it to work for him as well. He's looking into it at this time.
Thanks for your response,