Delayed Connection to datasource
Posted: Fri Sep 23, 2011 8:54 am
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
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