By using this website, you agree to our Terms of Use (click here)
Trying to add a field in the totals section for the amount paid in the SO Invoice form. I have tried [SOInvoice.CuryPaymentTotal] and [SOOrder.CuryPaymentTotal] but nothing is returned even when their is a value in the invoice.
Unfortunately there are some fields that only calculate in the screen and this is one of them. I'm not 100% sure, but I think the reason for it has to do with performance concerns.
It should be a pretty light customization for them to enable this field in the DAC to calculate globally and not just in the screen.
You might even ask how to do it on StackOverflow and maybe a developer will do it for you.
We did this by creating a subreport and passing the total payments to a variable, then returning the variable in the totals section.
Good idea to use a variable Dennis. Then you were able to use the same variable in a calculation in addition to displaying the value?
Created a subreport using ARAdjust2 table. Parameters I used was string of RefNbr. Filter is ARAdjust2.AdjdRefNbr = @RefNbr.
On the detailSection1 I created a variable collection:
Variable Name: Payment
=switch(
[ARAdjust2.AdjgDocType] = 'PMT', [ARAdjust2.CuryAdjdAmt],
[ARAdjust2.AdjgDocType] = 'CRM', -1*([ARAdjust2.CuryAdjdAmt])
)
Variable Name: PaidTotal
=$PaidTotal + $Payment
groupFooterSection1: TextBox with value of =$PaidTotal
Main report: Added the subreport to my Header of Line Documents. Set the parameters for RefNbr.
In my Footer of Line Documents I created a variables collection:
Variable Name: $PAIDLineAmt
=switch(
[<table>.ARDocType] = 'CRM', round(-1*[$PaidAmount_PaidTotal],2),
[<table>.ARDocType] = 'INV', round([$PaidAmount_PaidTotal],2)
)
Variable Name: $PAIDTotal
=$PAIDTotal + $PAIDLineAmt
Then a textbox for =$PAIDLineAmt
I did it this way so I can reference $PAIDLineAmt in the various formulas being used in the report and I never have to change them. Just change the one variable if something doesn't do the way you want.

