//{@reset} to be placed in the group #1 header:
whileprintingrecords;
numbervar summax := 0;
//{@accum} to be placed in the group #2 footer.
whileprintingrecords;
numbervar summax := summax + maximum({table.amt},{table.voucher}); //where {table.voucher} is your group field
//{@display} to be placed in the group #1 footer:
whileprintingrecords;
numbervar summax;
This will give you a sum of the maximums of group #2 for your outer group #1. You were using the terms for groups in an unusual way. Group #1 is your highest level group, group #2 is nested within Group #1, so I assumed you meant you wanted to sum the maximums for group #2 at the group #1 level. If what you really want is a report total, then you don't need the reset formula, and you would place the display formula in the report footer.
To have both group and report totals in the above situation, you would add a variable to the detail formula:
//{@accum} to be placed in the group #2 footer.
whileprintingrecords;
numbervar summax := summax + maximum({table.amt},{table.voucher});
numbervar grtotmax := grtotmax + maximum({table.amt},{table.voucher});
Then use a display formula in the report footer:
whileprintingrecords;
numbervar grtotmax;
Because there is no reset formula, it continues to add across groups.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.