concatenate currency symbol and Amount

Hi All,

Would like to know how to concatenate currency symbol with line amount?

ex: $ 1,254

i want the symbol next to the amount in reports… How to achieve this???

TextBuffer t;
str t1;
;

t=new TextBuffer();

t.setText(‘1254’); // you can use variable also like t.settext(variable_Name);

t.insert(’$’,0);

t1=t.getText();

// now t1 have a string value with prefix ‘$’ sign

verify the solution pls

Hello,

You can use very simple method;

Str value;

;

value = StrFmt(" %1 %2", CurrencySymbol,LineAmount );

or you can hardcode the value as

value = StrFmt(" $ %1", LineAmount );

or you can use num2str() to convert the real to string and concatnate with currency symbol;

Hope it will helps you.

there is another way to concatenate :

void conc()

{

str curr;

str lineAmount;

str concate;

;

concate=any2str(curr) + any2str(lineAmount)

}

// + operator is the simple way to concatenate i

i hope this sample of code help you

My Technical Blog: https://community.dynamics.com/product/ax/axtechnical/b/msdynamicsax2009abdelahmed/default.aspx?wa=wsignin1.0

if you need any help