Formatting the Amount Field in BACS EXport Report 10550

Hi Forum, I have to amend the Amount field that is output to the BACS.csv file. My problem is two fold, firstly I’m not really a programmer (But can do some things as previous posts will show) and secondly the amount field must not contain a decimal point (the last two digits are assumed to be pence.

The line of code reads as thus…

Line := FORMAT(Line + FORMAT(“Amount (LCY)”,0,’<Decimals,3>’)) + ‘,’;

I dont really understand this line of code but what I want is the amount without the decimal point and must be a maximum of 10 in length, how do I amend this this line of code so that an amount of 10000000.99 reads as 1000000099. Thanks…Paul [:)]

I would try this:

Line := FORMAT(Line + DELCHR(FORMAT(“Amount (LCY)”,0,’<Decimals,3>’),’.’)) + ‘,’;

This should work - basically we are deleting the decimal from a text formatted string that was the amount field.

Hi Simon, Thanks for the help. I tested this code and unfortunately it gave the following error…

The contents ‘.’ of DELCHR parameter No.2 are invalid. [:’(]

Any other thoughts

Say Hello to everyone in the office for me please


Sorry Paul, try this:

Line := FORMAT(Line + DELCHR(FORMAT(“Amount (LCY)”,0,’<Decimals,3>’),’=’,’.’)) + ‘,’;

I have highlighted the extra code in red.

Hi Simon, works like a dream, thanks alot.

Paul [:D]