Wednesday, January 12, 2011

"A data source instance has not been supplied for the data source" exception w/ Report Viewer Control

This exception occurs in a number of scenarios, in my case, it pop up because i forgot to add this line before the refresh of the reportviewer in the form load event trigger:

 this.[data source name].DataSource = [data object];

where [data source name] is the data source object created and the [data object] is the business object that talks to the database to retrieve the relevant data for report display

No comments:

Post a Comment