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!

Getting data from group header

Status
Not open for further replies.

cvasquez

MIS
Feb 28, 2001
88
US
From a report that I created, there are two group headers item number and totals.

I want to now create a summarization at the end of the report with the totals from group header. How do I do that?
 
I guess you're saying that you have 2 groups, and that within each of these groups you have an aggregate in the group header that you wish to provide grand totals for in the report footer.

Note that 2 line posts don't convey much, your best bet is to post technical inforamtion:

crystal version
database/connectivity
example data
expected output

Since you give NO indication as to how these were createdd, I'll assume that they are based on some formula, because you could just right click any field in the details and select insert->summary-sum and select grand total to get this for a common field.

If you have a formula, you might need to create a variable to add the values in each group using the 3 formula method:

Report header formula: //reset it
whileprintingrecords;
number MySum:=0;

Group header formula:
whileprintingrecords;
number MySum:=MySum+{@yourformula}

Report footer formula for display:
whileprintingrecords;
number MySum

If you need aggregates in a group for it's child group, change the reset and display formulas to reside in the outer groups header/footer, and place the group header formula in the inner groups header.

As you can see, your skimpy post resulted in lots of guess work, please try to convey the full reqquirements and environment in future posts.

-k
 
You could also try inserting a crosstab in the report footer, using item number as the row and inserting the appropriate summary.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top