Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multimple sub reports

Status
Not open for further replies.

sumeet22

Programmer
Feb 4, 2005
25
US
Hi,

Have a weird scenario. I have multiple sub reports embedded on a main report. Here is the typical scenario:

Main report uses a stored proc to get rows with ids that need to be passed into 5 sub reports. Let's say customer_id needs to be passed into all of those sub reports and the sub reports will query database to get the corresponding records. There are 4 customer ids.

I created details section a, b, c, d, e for each sub report and placed the sub reports in those sections. Now the problem is, I want to be able to process all 4 ids for sub report A before moving on to subreport b.

Right now, the report processes sub reports for id 1, then id 2, then 3, and 4 in a nested manner.

Is there any way to process all ids on the 1st sub report, then 2nd subreport then 3rd, 4th and 5th ? without having to get a nested result ?

Please help
 
Don't place the subreports in the details section as they will fire for every row in the database. Why are you passing the IDs to the subreport if you want all of them?

Place the subreports in the Report Header or Report footer section, and use the same filtering criteria from the main report, but not an atomic ID level link.

To clarify posts, please post technical information:

Crystal version
Datbase/connectivity used
Example data
Expected output

-k
 
Thanks for the response. I am using verson 10. Database connectivity is SQl server ole db.

Example data:

usp_Customer will get 5 rows with distinct ids for the main report. Sub reports use 5 different stored proc that expects 5 different customer ids.

sub_rpt_usp1 will get multiple addresses for sub report 1
sub_rpt_usp2 will get multiple activities for sub report 2
sub_rpt_usp3 will get multiple orders for sub report 3
sub_rpt_usp4 will get multiple shipment info for sub report 4
sub_rpt_usp5 will get multiple third party info for sub report 5

given the scenario, if I put sub reports on header or footer section, it will only process the first id linked to the main report. The requirement is all the 5 consumer ids need to be passed into sub report and process the ids.

Any advice ?

Thanks in advance.
 
If you have some field/value at a level above those customer Ids, you could create group sections (versus detail sections) on that field and put your subreports in the group headers or footers. That has worked for me in a report with many subreports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top