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

Main report and subreport accessing same result set

Status
Not open for further replies.

DiggerDog

Programmer
Nov 24, 2002
60
AU
Hi

I am using CR-8.5 & CR-10

I have a report with numerous subreports. The main and subreports access the same Stored Proc on a MS SQL 2000 DB. The subreports are linked to the main report using the SP parameters.

When I run the report it executes the SP for the main report and then for each of the subreports - is it possible for the main report to run the SP get the sub-reports to use the result set returned to the main report, as opposed to each sub-report running the SP individually.
 
This may be possible by using a development tool to pass a recordset to each of your reports.

Using the Crystal designer this is not possible.

HTH



Gary Parker
MIS Data Analyst
Manchester, England
 
If the main report & subreports are accessing the same data set, why the need for the subreports?
 
I agree with GM, it sounds like you should rethink the architecture. A subreport is generally used because it is returning a different result set.

Rather than posting generic text, try posting technical information, someone here may have an alternative design that will prove faster (subreports are slooooow) and more readily implemeted/maintained.

Crystal version
Database/connectivity
Example data
Expected output

-k
 
Hi again

The report design I use is necessary as I have to group and summarise and present the same data in many different ways to the main report.

This report is a 1 page executive summary which requires information presented may different ways.The SP returns all the data required by the main report and sub-reports, hence the reason I use the one SP for all the reports.

The technical information regarding this thread is I wish to know if there is a was to get the sub reports to access the result-set returned to the main report instead of each subreport executing the SP individually.

thanks for your help [thumbsup2]






 
The short answer is no.

Perhaps you should have the SP write to a table and then have the subs use the table if the SP takes a long time.

Presenting data differently can be done in multiple ways by using multiple cross-tabs in the main if that helps.

-k
 
Thanks K

Unfortunatly cross-tab is not an option - and the sp does access a single table with the required data - I was just trying to make the report more efficent by getting it to run the sp once only

thanks all for your input

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top