Accounts Receivable Title Report in Multiple Currencies

-3

In my report I assign 2 templates, one of titles open and the other of the quotations in my environment.

I created a parameter field i-moeda and dt_cotacao for the user to report.

I've created a formula Vl_moeda so I can assign the original value if the currency is 0 and divide when it's euro or dollar, but I need help.

FORMULA Vl_moeda:
IF {?i-moeda} = 0 THEN {Command.VL_SALDO}
ELSE ToNumber(SELECT("{Command_1.VL_COTACAO} from Command_1 where {Command_1.CODIGO} = {?i-moeda}) AND {Command_1.DT_COTACAO} = {?Dt_cotacao}"))

I noticed that in this select the result is true and if I put an IF by assigning the field Command_1.VL_COTACAO to perform the calculation ( Command.VL_SALDO / Command_1.VL_COTACAO ) when executing the report it duplicates the title records as many as the existing records in the template currency.

Thank you in advance for your attention.

Rosemeyre Pelisson

    
asked by anonymous 04.01.2019 / 14:19

0 answers