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!

Main Report use summary information from subreport

Status
Not open for further replies.

MEDIABO

Technical User
Jun 26, 2006
1
US
What I'm wondering is, is there a way to get the main report to look up information in a subreport?

Main Report information = vendor A
Sub Report information = vendor B

I need to do the following:
Summary info vendor A (MainReport)
-Summary info vendor B (Sub report)
=Total Summary info needed displayed in main report
 
You could, but why wouldn't you just insert a group on vendor and run the main report for both vendors. The summaries would then be in the group footers, and you could add grand total fields.

-LB
 
You're better served to supply technical information:

Crystal version
Database/connectivity
Example data
Expected output

LBs suggestion makes sense from your decription, but it may not serve your needs if there's soemthing which makes you think that a subreport is required.

In general they're a bad idea.

Anyway, you can use Shared Variables to pass data back and forth between main and subreports, as in the following placed in a subreport:

shared numbervar MyTotal:= sum({table.field})

Then in a sectionafter the subreport runs one would use:

whileprintingrecords;
shared numbervar MyTotal;

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top