How do I format a column total as currency?
Here's what does not work.
How to Format Column Totals in Grid
How to Format Column Totals in Grid
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
-
- Posts: 2413
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: How to Format Column Totals in Grid
Try adding single quotes around the Number Format.....
<b>Total Income: <<SUM Income.Amount, '$#,##0'>></b>
<b>Total Income: <<SUM Income.Amount, '$#,##0'>></b>
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: How to Format Column Totals in Grid
This will work for number formatting in the grid
<b>Total Income: <<SUM Income.Amount@#,##0.00>></b>
As to the $, you may have to use html,
<b>Total Income: <<SUM Income.Amount@#,##0.00>></b>
As to the $, you may have to use html,
Re: How to Format Column Totals in Grid
I'm afraid neither of the above is working.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: How to Format Column Totals in Grid
Thats strange, this works for me: (on a Query Grid, not sure about a form Grid)I'm afraid neither of the above is working.
<div style="text-align: right;background" font-weight: 900; background-color: #d3d3d30a; ><<SUM GenLedger.Credit@#,##0.00>></div>
Did you remove the $ and the comma after the Amount and replace with an @
Re: How to Format Column Totals in Grid
I suspect either this item is not fully built out or there are limitations.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
MySQL, AWS EC2, S3
PDFtk Toolkit
Re: How to Format Column Totals in Grid
The reason why it is not working is because in the bounded RED area you have two commas which signals to AwareIM that you have three variable,
Income.Amount then a variable with $# then another variable containing ##0
You could try changing the $#,##0 to be $#.##0 and see if either the attribute format or the locale format takes care of it. Other than that - I'm stumped. In the past, to get round this I've used Total Amount: £<<SUM Income.Amount,0.00>> which kinda worked until I got a European customer who needed commas instead of full stops as the decimal separator. Fortunately they were very understanding.
Maybe this is one for Vladimir
Income.Amount then a variable with $# then another variable containing ##0
You could try changing the $#,##0 to be $#.##0 and see if either the attribute format or the locale format takes care of it. Other than that - I'm stumped. In the past, to get round this I've used Total Amount: £<<SUM Income.Amount,0.00>> which kinda worked until I got a European customer who needed commas instead of full stops as the decimal separator. Fortunately they were very understanding.
Maybe this is one for Vladimir
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5