Note that the datasource name needs to match what was set up in the reportviewer, in this case: ReportDataSet_TestFinancial
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"
Name="ReportDataSet_TestFinancial" />
</DataSources>
Dim params As SqlParameter() = {New SqlParameter("@StartDate", "8/23/2007"), _
New SqlParameter("@EndDate", "9/27/2007"), _
New SqlParameter("@UnitID", 61)}
Dim dsFinancials As DataSet
Try
dsFinancials = SqlHelper.ExecuteDataset(Global_asax.gSqlConStr, 30, "spGetFinancialsWeekly", params)
Catch ex As Exception
Dim ErrorHdl As _Error = New _Error
ErrorHdl.HandleException(ex)
dsFinancials = Nothing
End Try
rpvFinancialsWeekly.LocalReport.DataSources.Clear()
rpvFinancialsWeekly.LocalReport.DataSources.Add(New Microsoft.Reporting.WebForms.ReportDataSource("ReportDataSet_TestFinancial", dsFinancials.Tables(0)))
rpvFinancialsWeekly.DataBind()
rpvFinancialsWeekly.LocalReport.Refresh()