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

CR XI - Totaling a Shared NumberVar from a SubReport 1

Status
Not open for further replies.

CrystalLion

Programmer
Jan 3, 2007
113
US
Main report is grouped as follows.
G1 - ProgDesc from Program table
Displays only the ProgDesc
G2 - OrgName from Profile table
Displays OrgName and Address
G3 - Voucher# from ApLinesHis table (contains SubReport1)
SubReport1
G1 - Voucher# from ApLinesHis table
contains a shared numbervar @TotalPayments
and gets passed to the main report and is
placed in Gf4
G4 - Voucher# from APLinesHis table

Tables are linked together through a 4th table AppHistory)


Main Report Gf4 contains the following columns:

Voucher# OrgName ProgramName ProgDesc @TotalPayments
20071234 ABC Agcy Better Teeth Health $1,000

I want to summarize the @TotalPayments onto Gf1, and do a Report total.

Any help is appreciated.
Thanks,
L
 
If the correct value is displaying in GF4, then use a formula like this (placed in GF4):

//{@accum}:
whileprintingrecords;
numbervar grpsum := grpsum + {@TotalPayments};
numbervar grtot := grtot + {@TotalPayments};

//{@reset} to be placed in GH1:
whileprintingrecords;
numbervar grpsum;
if not inrepeatedgroupheader then
grpsum := 0;

//{@grpsumdispl} for the GF#1:
whileprintingrecords;
numbervar grpsum;

//{@grtotdispl} for the report footer:
whileprintingrecords;
numbervar grtot;

-LB
 
LBass - you are a Crystal sage. Your suggestion worked like a charm. Thanks very much. If I could award 10 stars, I would.

L
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top