Monday, 15 June 2009

ASP .net: reportViewer Operation is not valid due to the current state of the object

While you are in a drillthrough report, the LocalReport object represents the drillthrough report - the value of the report path, parameters, etc. Conceptually, you can't change this report, it was defined by the parent report. If you could, it would leave the back button enabled on the toolbar, which doesn't really make sense. The correct thing to do is first call ReportViewer.Reset(). This will reset the report stacks and allow you to set a new definition.

No comments:

Post a Comment