Hi
I have a report where there is a field called value which is calculated in the below formula @get_value :
This value is supposed to display value with brackets when this is the type of Credit, no bracket when there is Debit ( invoice type) associated
so:
Type Invoice Cost Value
CR (25.00)
DB 35.00
CR (15.00)
M 45.00
etc...
Now if I insert a Summary for subtotal of "Value" , I cannot get a correction result.
So I used a formula and put in the group head section and suppresed it:
(This forumla needs to take consideration of currency code for each record)
whileprintingrecords;
CurrencyVar acq_sub_amount;
if ({CCY.ANSI}) = "" then
ccur(0.00)
//acq_sub_amount := acq_sub_amount +
{@get_value}
else if {CCY.ANSI} = 'USD' then
acq_sub_amount := acq_sub_amount + ccur(
{@get_value})
else if ({CCY.ANSI}) = 'SGD' then
acq_sub_amount := acq_sub_amount + ccur(
{@get_value})
else if ({CCY.ANSI}) = 'AUD' then
acq_sub_amount := acq_sub_amount + ccur(
{@get_value})
else if ({CCY.ANSI}) = 'GBP'
another formula to handle the display of the subtotal:
whileprintingrecords;
currencyvar sub_value_amt;
The above approach didn't get a correct result either. the above should be $80.00. How do I get rid of those values with brackets in the addup? could anyone please advise? thanks in advance.
John