I’m using a ReportBook to display 2 different reports. Both reports can also run independently from the
other. The second report is a recap of
the first report, which means the data for the second report relies on the same
data generated for the first report.
The ObjectDataSource.DataSource of both reports are assigned the same Type ( typeof(MyDataObject) ), but they are assigned different DataMembers. MyFirstReport calls MyDataObject.GetRecords() and MySecondReport calls MyDataObject.GetRecapRecords().
When they are run together in the ReportBook, both reports are creating a unique instance of MyDataObject. In other words, there are two instances of MyDataObject created. Since both reports use the same DataSource Type, is there any way for both reports to share only one instance of MyDataObject when they are run from the ReportBook?
The ObjectDataSource.DataSource of both reports are assigned the same Type ( typeof(MyDataObject) ), but they are assigned different DataMembers. MyFirstReport calls MyDataObject.GetRecords() and MySecondReport calls MyDataObject.GetRecapRecords().
When they are run together in the ReportBook, both reports are creating a unique instance of MyDataObject. In other words, there are two instances of MyDataObject created. Since both reports use the same DataSource Type, is there any way for both reports to share only one instance of MyDataObject when they are run from the ReportBook?