Hi All,
I need to generate a report with a subreport in a Group Header.
The subreport uses a different datasource to the main report.
The main link between the 2 datasources is a customerID (INT) and SerialNumber (CHAR)
The main report is grouped by Serial Number and we need the subreport to only show the details for each serial number in the group header.
All pretty straight forward stuff...
I know that it is achievable to filter the subreport by CustomerID & SerialNumber, to give me the desired view.
However running it this way (All Customers & All Serialnumbers in the subreport datasorce) would constitue 100,000's of values and this could be reduced dramatically if I could run the subreport datasource to Only that customers serialnumber details in the subreport and then applying the filtering for each serial number in the subreport databand
So in the name of efficiency I would like to delay the connection of the subreport datasource until we have derived the CustomerID value from the main datasource into a parameter and then the Subreport datasorice connects with a filter in the SQL statement for the customerID parameter. (I am happy on how to use parameters, its the timing of the subreports datasource execution)
Is this possible? If so could somebody explain please
Or is there another way to achieve this?
Many thanks in advance
Delayed Connection to datasource
Delayed Connection to datasource
Hello,
If we have correctly understood your problem, then you can set the ConnectOnStart property for the data source in the subreport to false. On the main page set filtration options for the detail data source and then connect it DetailDataSource.Connect ();
Thank you.
If we have correctly understood your problem, then you can set the ConnectOnStart property for the data source in the subreport to false. On the main page set filtration options for the detail data source and then connect it DetailDataSource.Connect ();
Thank you.
Delayed Connection to datasource
Fantastic, that worked just how I needed it to.
For anybody else...
I placed the connect info for our subreport data source in the "Rendering" Rendering Event control
Thanks for your reply.
For anybody else...
I placed the connect info for our subreport data source in the "Rendering" Rendering Event control
Thanks for your reply.
Delayed Connection to datasource
Great! :biggrin: