Group field on a query. SUM function on a currency field. I cannot get a reasonable display.
I have spent hours - this is simple, surely even I can get this.
...Not so. I give. Anything other than right align or plain {value} fails for me.
Tried:
<p align="right">{Value}$###,###.00</p>
<p align="right">{Value},$###,###.00</p>
<p align="right">{Value,$###,###.00}</p>
<p align="right">{Value},N</p>
<p align="right">{Value},n</p>
<p align="right">{Value},####,###.00</p>
<p align="right">{Value}####,###.00</p>
<p align="right">{Value,####,###.00}</p>
{Value}####,###.00
and many others.
Format Group field on query
-
- Posts: 50
- Joined: Sun Aug 10, 2008 7:40 pm
- Location: Tulsa, OK
- Contact:
Format Group field on query
Dan
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
Re: Format Group field on query
yeah, you're spinning your wheels there.
pretty sure thats just an oversight - something that was never implemented (but can be) and has never been reported.
to be safe and be sure thats its seen, just write it up and send it as a bug to [email protected]
1) You can see the row data will respect a format (like $ #.##), yet the group total will ignore the formatting (as you've seen)
Easily doable by Vlad - so you'll just have to wait for that in a future build. No reason the Group {value} can't either:
a) allow for explicit formatting as you tried, or
b) as a minimum, just format it the same as the column data
2) In your tests, you prolly realize you can view the Server Output and see "invalid expression...." entries as you whittle away your time.
pretty sure thats just an oversight - something that was never implemented (but can be) and has never been reported.
to be safe and be sure thats its seen, just write it up and send it as a bug to [email protected]
1) You can see the row data will respect a format (like $ #.##), yet the group total will ignore the formatting (as you've seen)
Easily doable by Vlad - so you'll just have to wait for that in a future build. No reason the Group {value} can't either:
a) allow for explicit formatting as you tried, or
b) as a minimum, just format it the same as the column data
2) In your tests, you prolly realize you can view the Server Output and see "invalid expression...." entries as you whittle away your time.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2400
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Format Group field on query
Try this....in the Presentation Column
For SUM
<span style="font-weight: bold; color: navy; float: right;">#= kendo.toString(sum, 'n') # </span>
For COUNT
<span style="font-weight: bold; color: red; float: right;">#= kendo.toString(count, 'n') # </span>
For SUM
<span style="font-weight: bold; color: navy; float: right;">#= kendo.toString(sum, 'n') # </span>
For COUNT
<span style="font-weight: bold; color: red; float: right;">#= kendo.toString(count, 'n') # </span>
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....
-
- Posts: 50
- Joined: Sun Aug 10, 2008 7:40 pm
- Location: Tulsa, OK
- Contact:
Re: Format Group field on query
I agree Jaymer, this "should be there".
However, Mark your suggestion worked great. Thanks.
Added: font-size: 1.10em for a little size increase for the grouping total.
Added: a "$" -- although I thought I had seen that "$" might be trouble - but works here.
<span style="font-size: 1.10em; font-weight: bold;color: navy; float: right;">$#= kendo.toString(sum, 'n') # </span>
Looks good!
However, Mark your suggestion worked great. Thanks.
Added: font-size: 1.10em for a little size increase for the grouping total.
Added: a "$" -- although I thought I had seen that "$" might be trouble - but works here.
<span style="font-size: 1.10em; font-weight: bold;color: navy; float: right;">$#= kendo.toString(sum, 'n') # </span>
Looks good!
Dan
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
Re: Format Group field on query
this is greatBenchmarkDan wrote:I agree Jaymer, this "should be there".
all it needs is to actually be "in the product", not out on a forum somewhere, un-findable.
could easily be attached by support as a popup-help window and then anyone could do it.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 50
- Joined: Sun Aug 10, 2008 7:40 pm
- Location: Tulsa, OK
- Contact:
Re: Format Group field on query
You got that right.
Dan
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
_______________________________________________
V8.4 Developer Edition Build 2722. MS SQL Windows
Re: Format Group field on query
WOW, this post just saved my life!!!
Here's another one I missed these past 9 years if anyone can help?. I've been changing a lot of my numeric attributes to be currency attributes, and utilising the Locale info to format UK customers with £ and Canadian customers with $ (only recently picked up some Canadian customers so it hasn't really been an issue until now - just me being lazy I guess)
All great except the report writer seems to totally ignore the locale data and just uses $
and ... does anyone have a similar solution for SUMming a duration attribute in a group. Vlad says it doesn't work and isn't meant to work, but I have no difficulty summing a duration at the bottom of a grid
Here's another one I missed these past 9 years if anyone can help?. I've been changing a lot of my numeric attributes to be currency attributes, and utilising the Locale info to format UK customers with £ and Canadian customers with $ (only recently picked up some Canadian customers so it hasn't really been an issue until now - just me being lazy I guess)
All great except the report writer seems to totally ignore the locale data and just uses $
and ... does anyone have a similar solution for SUMming a duration attribute in a group. Vlad says it doesn't work and isn't meant to work, but I have no difficulty summing a duration at the bottom of a grid
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Re: Format Group field on query
and in answer to my own question, this brilliant fix didn't work for totally group durations (but totalling the whole query works .... how strange)
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5