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

Group Summary

Status
Not open for further replies.

lauriebizz

Technical User
Sep 19, 2005
53
US
Hi All,
I've got Crystl 9 and SQL.

I've got a report created to summarize sevral invoices. Problem I have is the freight is at the header level and when I place the field {inv_hdr.freight} in the group (group by invoice number) then I get the correct $ amount; however when I sum the field it mulitplies by the # of lines in the group and the amount is nowhere near where it should be.

Here is my formula:
sum({inv_hdr.freight},{inv_hdr.inv_num})

Thanks!
Laurie
 
I found the solution - running totals!
Thanks!
Laurie
 
Laurie, try this

right click on your group header and hit "insert section below" then move your fields into the new section.
Place this formula in the group header "a".

whileprintingrecords;
numbervar X;
X := 0

place this formula in the groupheader "b" where {inv.hdr_freight} should be

whileprintingrecords;
numbervar X;
X := X + {inv.hdr_freight}

then place this formula in the group footer

whileprintingrecords;
numbervar X;
X := X

When you are done you can upress the first two formulas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top