Number Grouping

Stimulsoft Reports.WEB discussion
Post Reply
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Number Grouping

Post by beginner »

Hi,

I'd like to use number grouping at every 3 digits, e.g. 3,333,234.

The issue is I'm using Persian function to show the numbers in Persian digits, since this function only operates on strings and integers, I'm converting my decimal to string. So Text Format doesn't apply to the columns.

This is the full code that I'm using for the column:

Code: Select all

{IIF(Floor(DataSource2.NQuantity)==DataSource2.NQuantity,
Persian(Floor(DataSource2.NQuantity).ToString()),
Persian(Math.Round(DataSource2.NQuantity, 2).ToString())
)}
I'll be grateful if you could guide me with my requirements:

1. If numbers don't have any point, they should be printed as integers, e.g. 2.0000, should be 2.

2. Otherwise we'll print only 2 points, e.g. 2.23444, should be 2.23.

3. They should be grouped every 3 digits, e.g. 234234, would be 234,234.

4. They should be in Persian.

Thanks in advance,
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Number Grouping

Post by HighAley »

Hello.

This feature need more detailed consideration.
Please, send us a feature request to support@stimulsoft.com.

Thank you.
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: Number Grouping

Post by beginner »

Hi Aleksey,

I kind of need it for today, is there any quick workaround? Something like custom filters, masks?

Thanks for your consideration.
beginner
Posts: 36
Joined: Thu Jun 18, 2015 5:01 am

Re: Number Grouping

Post by beginner »

Well,
This code works just fine! :)

Code: Select all

{IIF(Floor(DataSource2.MTotalPrice)==DataSource2.MTotalPrice,
Persian(Floor(DataSource2.MTotalPrice).ToString("#,##0")),
Persian(Math.Round(DataSource2.MTotalPrice, 2).ToString("#,##.00"))
)}
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Number Grouping

Post by HighAley »

Hello.

Great!
Let us know if you need any additional help.

Thank you.
Post Reply