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/Subreport and Counting Records

Status
Not open for further replies.

vafishing

Programmer
Jul 18, 2001
35
US
I am using crystal 8.5. I have a mainreport and a subreport which displays membership types. Here is an example: Single Installment(in main report) Single installment(subreport). If there is an entry in the subreport, I want to count it and add it to a total in the main report. For example I want to show the total number of single installments in a total in the main report, despite the fact that it is listed in the subreport. Am I to use a shared var and if so how would it need to be set up
 
In your subreport:
Code:
//formula1
Shared NumberVar X := Count({Stuff});
In the main report - not to be placed any sooner than the section after the section which contains the subreport:
Code:
//formula2
WhilePrintingRecords;
NumberVar Y;
Shared NumberVar X;

Y := Count({Stuff}) + X;
//to add it to the main report total.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top