This is a migrated thread and some comments may be shown as answers.

Global/shared data items between subreports

1 Answer 123 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ada
Top achievements
Rank 1
ada asked on 11 Jun 2007, 03:08 PM
Hi,

Suppose I have a report made up of several subreports. A number of these subreports need to use the same piece of data queried from a database. Is it possible to only query the data once (i.e. in the master report) and then access it within each subreport as opposed to each subreport having to retrieve the data itself?

Thanks

1 Answer, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 11 Jun 2007, 04:32 PM
Hello ada,

As you actually bind a report to a data set you can fill it (the data set) once, and then use it for all nested reports. You can examine the MasterDetail example in our sample project library that demonstrates a hierarchy of 3 nested reports. Both ProductSubCategory and ProductCategory reports contain SubReport items and handle their NeedDataSource events to connect the nested reports to a data source. You can handle the SubReport.NeedDataSource event in the topmost (master) report and retrieve the data only once.

 
Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
ada
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Share this question
or