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

Summarizing Shared Variables 1

Status
Not open for further replies.

chris777

MIS
Jan 3, 2002
228
US
I have a shared variable that I pass from a subreport to a formula in GF4. This works fine. However, I would like to summarize the number displayed by this formuala in GF3 and GF2. Every way I try it I seen to get an error that the summary cannot be created.

Can this be done, and if so, any suggestions as to syntax?
 
if you are summing the value...don't use the summary functions

//place this in the report hearder suppressed or in a Group header if the sum is done more than once (beware of repeat headers...add a condition: Not inrepeatHeaders)
@Initialization
numberVar sumtotal := 0;


Simply create a formula that does a manual sum

@sumofShared

whilePrintingRecords;
numberVar sumtotal;
shared numberVar subreportValue;

sumtotal := sumtotal + subreportValue

then create a display formula

@displaySumTotal

whilePrintingRecords;
numberVar sumtotal;
sumtotal;

this is your basic 3 formula sum
 
That was it. The simplist answer is genrally the correct one.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top