How do I programmatically set the data source for the ASP.NET ReportViewer control?
I have a VS 2008 ReportViewer control and want to switch between a couple of different reports.
I can switch reports by setting the report source and refreshing the control, but I can’t see where to set the data source.
Each report has its own data source, and if I configure them initially when the control is built it is fine, but I need to switch between them.
I assume the question is about ReportViewer control.
"dsname"is the name of the data source, you can find it .rdlc file.sourceis the variable with data you want to show in the report.