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

subtotal shared variable from subreport 1

Status
Not open for further replies.

suburbanites

Programmer
Aug 16, 2007
75
US
Hi, I'm using CRXI SP1

I have a shared variable from a sub report. I am using this in GF5 an it displays perfectly. I have the following formulas:

GH1
WhilePrintingRecords;
Shared NumberVar totamtbud:= 0;


GF5
WhilePrintingRecords;
Shared NumberVar totamtbud;
totamtbud


My problem is I want a subtotal on this variable on GF3 everytime there is a change in seq#.

How do I go about this? Thanks so much for your help..
 
Where is the subreport located? What sequence #? You haven't provided enough information. What fields are you grouping on?

-LB
 
subreport is located in GH5. Seq# is just a grouping on data.

Grp1 - Company
Grp2 - Accounting unit
Grp3 - Seq#
Grp4 - Account
Grp 5 - Subaccount

I actually have the shared variable in detail1 and the reset variable in GH1

 
Your reset formula belongs in GH#5_a, with the sub in GH#5_b. Then create additional formulas like this:

//{@resetsum} to be placed in GH#3:
whileprintingrecords;
numbervar sumamt;
if not inrepeatedgroupheader then
sumamt := 0;

//{@accum} to be placed in GF#5:
whileprintingrecords;
Shared NumberVar totamtbud;
numbervar sumamt := sumamt + totamtbud;

//{@display} to be placed in GF#3:
whileprintingrecords;
numbervar sumamt;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top