I've seen code that sets up a reportviewer dynamically, like this:
Dim dtReport As New DataTable = GetDataTable("Rpt1")
LocalReport.ReportPath =
"Rpt1.rdlc"
Dim rdsReport As New ReportDataSource
rdsReport.Name = "Rpt1Data"
rdsReport.Value = dtReport
ReportViewer1.LocalReport.DataSources.Add(rdsReport)
ReportViewer1.LocalReport.Refresh()
I'd like to be able to use this approach, but VS2005 complains if my rdlc does not have a DataSet. Is there a way to set up the dataset in the rdlc so that I don't have to actually wire it up to data, since I need to do that dynamically in code?
Thank you.