D
Duke
I have an ASP.Net 2 page with a Report Viewer control (sp1) that displays a
local report. The report uses the results from a SQL Server 2005 stored
procedure. It was running fine but given that ASP.Net supports asynchronous
processing I thought I'd make the stored procedure call asynchronous, freeing
up resources on the web server whilst the slow running stored procedure is
executing.
Changing the stored procedure call over to asynchronous was straight forward
and it runs ok. Once the async code is completed the Page_PreRenderComplete
event fires at which point I have an ADO.Net DataSet containing my data,
which I need to set as a ReportDataSource, via...
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add( _
New ReportDataSource("DataTable1", _reportDS.Tables(0)) )
The Clear method works, but DataSources.Add generates an exception with the
message "Viewer control object is in a read only state".
Any ideas what is causing this and how I can fix it? Running the queries
asynchronously would be a huge boost to scalability.
Thanks,
Andrew
local report. The report uses the results from a SQL Server 2005 stored
procedure. It was running fine but given that ASP.Net supports asynchronous
processing I thought I'd make the stored procedure call asynchronous, freeing
up resources on the web server whilst the slow running stored procedure is
executing.
Changing the stored procedure call over to asynchronous was straight forward
and it runs ok. Once the async code is completed the Page_PreRenderComplete
event fires at which point I have an ADO.Net DataSet containing my data,
which I need to set as a ReportDataSource, via...
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add( _
New ReportDataSource("DataTable1", _reportDS.Tables(0)) )
The Clear method works, but DataSources.Add generates an exception with the
message "Viewer control object is in a read only state".
Any ideas what is causing this and how I can fix it? Running the queries
asynchronously would be a huge boost to scalability.
Thanks,
Andrew