Author |
Message |
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Topic: TRIPLE TOTAL Posted: 07 Oct 2016 at 10:04am |
Hi,
i am trying to modify a report that someone else wrote. it is for customer statements. The report is grouped by invoice number, and shows charges (positive values) in the charges column, and shows Payments and credits(negative values) in the credits column. As they are grouped by invoice, there is a third column which shows the total balance on the invoice. It is working fine, EXCEPT FOR THE LAST INVOICE ON THE LIST. For some reason, the total is tripling!!! I have tried several things, and I haven't been able to figure out why...
here is the formula they used for that total field:
If {V_LASER_AR_STMNT.TOT_MARKER}<>'X' then
Sum ({V_LASER_AR_STMNT.CHARGES}, {@ControlInvoice}) + Sum ({V_LASER_AR_STMNT.CREDITS}, {@ControlInvoice})
else
(Sum ({V_LASER_AR_STMNT.CHARGES}, {@ControlInvoice}) + Sum ({V_LASER_AR_STMNT.CREDITS}, {@ControlInvoice})) + ({V_LASER_AR_STMNT.CHARGES}-{V_LASER_AR_STMNT.CREDITS})
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 10 Oct 2016 at 3:21am |
the other thing i forgot to mention is, the report suppresses any zero balance invoices...
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 14 Oct 2016 at 8:22am |
if you remove your suppression you will likely see where the issue is.
One possible solution:
Use a Running Total that uses evaluate criteria that matches your suppression criteria.
Edited by DBlank - 14 Oct 2016 at 8:23am
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 14 Oct 2016 at 8:43am |
Thanks, I have tried running totals and I am getting double the amount on the last one. I noticed that not every statement is tripling... just select ones and i can't figure out a common thread. I did look in the table that the data is being pulled from and some have tripled lines. I'm not even sure how the table is built. I didn't write the program so I'm clueless.
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
Posted: 14 Oct 2016 at 9:12am |
are you using evaluation formulas in the RTs?
You also might just be able to use on change of and point to a PK from the main table if it has duplicate data in it.
|
IP Logged |
|
Kitty1
Senior Member
Joined: 14 Apr 2010
Online Status: Offline
Posts: 159
|
Posted: 14 Oct 2016 at 9:16am |
thanks. unfortunately i'm not understanding :( i'm not very experienced in all facets of Crystal. I appreciate your trying to help though! :)
|
IP Logged |
|
|