I got an error when i format the number for the report
An invalid field or attribute has been specified for the 'Format' property.
You can use following syntax, it's simple. But your code also working for me. what is the issue you got?
gTotalRequestAmount := FORMAT(555777.85,15,3);
I got same output in BC
gTotalRequestAmount := FORMAT("Purchase Header"."Amount Including VAT",15,3);
Thanks Shan, Narang
I want to format Amount with thousand separator. I tried to change parameter value in FORMAT but not successful
gTotalRequestAmount := FORMAT("Purchase Header"."Amount Including VAT", 0, '<Sign><Integer Thousand><Decimals>')
Thanks.
What do you need to achieve. if you use this format string you can specify decimal value. such as 1000002.25
it should be gTotalRequestAmount := FORMAT(1000002.5, 15, '<Sign><Decimals>');
if you don't have decimal use something like this
gTotalRequestAmount := FORMAT(1000002, 15, '<Sign><Integer>');
get idea from following resources
If your aim is to convert integer/decimal into a text, just use:
Text := FORMAT(Integer);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156