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

Sum invoice rows across multiple tax amounts

Status
Not open for further replies.

elsenorjose

Technical User
Oct 29, 2003
684
US
I am trying to create a summary that sums tax amounts for multiple invoice detail lines based on multiple tax amounts. The layout of the invoice detail table is something like:

Code:
invoice     line     tax1     tax2     tax3
12345       01       1.00
12345       02       2.00

Total for the invoice should be 3.00.

The report is grouped at the invoice master level which shows one row per invoice number. In this case, we see invoice 12345 with a tax total of 3.00. I've been asked to add a formula that uses the sum of the invoice detail tax amounts to validate that the system is correctly rolling up the invoice detail tax amounts into the invoice master tax total. Potentially there could be a dollar value in tax2 and tax3. Not often, but it does happen, so my formula would need to take that into account. I've tried a sum running total based on sum(tax1) + sum(tax2) + sum(tax3) and putting the RT into the invoice master GH but I get an error saying I can't create a running total on a print time formula. Can someone assist? I am using CR XI on SQL SERVER 2008. Thank you.

 
create this formula and place in group footer
Code:
sum({@tax1field},{@groupfield})+sum({@tax3field},{@groupfield})+sum({@tax3field},{@groupfield})

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Thanks COSpringsGuy but the formula is doubling the invoice detail amounts. Using a real world example:

Code:
invce_32	linnum_32	tax1_32	tax2_32	tax3_32
00945408	01	        170	0	0
00945408	02	        2.975	0	0

I am getting 345.96 as my total instead of 172.98
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top