How to Format Column Totals in Grid

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
kklosson
Posts: 1616
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

How to Format Column Totals in Grid

Post by kklosson »

How do I format a column total as currency?
Here's what does not work.
Screenshot_10.png
Screenshot_10.png (37.82 KiB) Viewed 21560 times
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
customaware
Posts: 2379
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: How to Format Column Totals in Grid

Post by customaware »

Try adding single quotes around the Number Format.....

<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....
Image
ACDC
Posts: 1135
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: How to Format Column Totals in Grid

Post by ACDC »

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,
kklosson
Posts: 1616
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: How to Format Column Totals in Grid

Post by kklosson »

I'm afraid neither of the above is working.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
ACDC
Posts: 1135
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: How to Format Column Totals in Grid

Post by ACDC »

I'm afraid neither of the above is working.
Thats strange, this works for me: (on a Query Grid, not sure about a form Grid)
<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 @
kklosson
Posts: 1616
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: How to Format Column Totals in Grid

Post by kklosson »

I suspect either this item is not fully built out or there are limitations.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
rocketman
Posts: 1234
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: How to Format Column Totals in Grid

Post by rocketman »

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
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Post Reply