Page 1 of 1

Number Grouping

Posted: Thu Oct 08, 2015 6:23 am
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,

Re: Number Grouping

Posted: Thu Oct 08, 2015 7:53 am
by HighAley
Hello.

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

Thank you.

Re: Number Grouping

Posted: Thu Oct 08, 2015 7:55 am
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.

Re: Number Grouping

Posted: Thu Oct 08, 2015 8:27 am
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"))
)}

Re: Number Grouping

Posted: Thu Oct 08, 2015 8:49 am
by HighAley
Hello.

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

Thank you.