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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading data only once when using subreports?

Status
Not open for further replies.

crystalvictim

Programmer
Dec 4, 2002
92
DE
Using Crystal Reports 8.5 we'd like to know if there's any veriyfied answer to the following question:

Is it possible to create a report that contains several subreports which show different views of the same data?

To be more precise, we want to create a main report with several subreports.
The main report selects ALL information that is required for ALL subreports.
Each subreport is linked to the main report.
Each subreport has an individual selection clause that further restricts the data received by the main report.
Finally, the data should be read only once (when processing the main report) and NOT for every subreport.

There is a chapter in the userguide that seems to deal with such an issue, but I wasn't able to figure out if this really does the trick or not :-(

This might sound a bit confusing but I hope you understand what I mean...

Thanks in advance.
 
A subreport is an independent report attached to the main one. It does its own file accesses, that's the whole point. And that's why subreports are a slow method and best avoided if the same job can be done in the main report.

In Crystal 8.5, you can have several subsections for a detail line. And each of them can be suppressed using different criteria, so that different details would show a different set of subsections. Would this be another way to get the result you want.

Madawc Williams
East Anglia, Great Britain
 
Madawc,
thanks for your reply! I suspected something like this when regarding the processing-model described in the crystal-documentation. but as the documentation isn't very precise in this point and gives some hints that might be interpreted in this way or another, my boss was quite optimistic about me finding out that it is possible to share the main report's data source.
For his purpose, suppressing certain detail information would not work as he needs all details, but at different times / in different groups.
Nevertheless you answer very helpful as we now know for certain how crystal deals with subreports. (I hope my boss shares my opinion in that point ;-)).

Cheers,
Frank
 
Consider using a View or SP with subqueries, and eliminate subreports entirely, they're eeeeeeevuuuuuhl.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top