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

Setting Maximum Amount in Summarrized Detail Field

Status
Not open for further replies.

GeneN24

IS-IT--Management
May 1, 2003
17
US
How can I create a group summary of a detail amount field without exceeding a specified amount?

I have done a formula for the group total, but cannot produce a grand total of that formula field since it is not directly based upon the detail. This is my actual objective.

Thank you
 
ALter your formula to also keep trasck of the totals using the 3 formula method, as in:

Report Header or outer group level:
whileprintingrecords;
numbervar GroupTotaling := 0;

Group Footer:
evealuateafter({<you group totaling formula>})
whileprintingrecords;
numbervar GroupTotaling;
GroupTotaling := GroupTotaling+<your group totaling formula>

Report Footer for display:
whileprintingrecords;
numbervar GroupTotaling

-k
 
I wasn't clear whether you had successfully created a formula for the group total. Something like this should work:

if sum({table.amt}, {table.groupfield}) > 500000 then 500000 else
sum({table.amt}, {table.groupfield}) //substitute your maximum for 500000

Then use SV's method to accumulate for the grand total.

-LB
 
Synapse,

I believe your solution worked. Thank you very much.

Gene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top