Help - Search - Members - Calendar
Full Version: calculated text areas
Fast Reports forum > Fast Reports Products > FastReport 4.0
mrtblt
Sometimes we sell our products in other currencies so we register price of the respective product in the table from the currency selected. But the invoice should be emitted in the local currency. So i need to multiply registered sales price with the exchange rate of the respective currency if the product's sales price is registered with another currency so it should be like the following :

CODE
if table.currency = 'EURO' then
inv_price := table.price*table.exch_rate
else
inv_price := table.price
end;


how may i do such thing in fast report?
gordk
you can change the memo's text from the obp event of its band or use the iif function inside the memo. do not connect the memo to a dataset field.
from the band obp
if table.currency = 'EURO' then
memoname.text :='[(<table."price">*<table."exch_rate">)]'
else
memoname.text '[ table."price"]'
end;

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.