Formate the value to show two digit after decimal.
mohanaraj
600001
Dear Alex,
In my report i want to show the value as like
total1 = 100.00
total2 = 101.20
but it shown as
total1 = 100
total2 = 101.2
How i achieve this in my report i use format the text object as
TextObject1.Text = "[Currency]" + string.Format("{0:#,##0.00}", "[TotalInc]");
[Currency] => this parameter for show the currency symbol.
[TotalInc] => total value.
in this which is wrong how can i solve this ?
Thanks in advance.
In my report i want to show the value as like
total1 = 100.00
total2 = 101.20
but it shown as
total1 = 100
total2 = 101.2
How i achieve this in my report i use format the text object as
TextObject1.Text = "[Currency]" + string.Format("{0:#,##0.00}", "[TotalInc]");
[Currency] => this parameter for show the currency symbol.
[TotalInc] => total value.
in this which is wrong how can i solve this ?
Thanks in advance.
Comments
Right-click the Text object and select "Format...". Then select Number formatting.
Dear Alex,
I bound this text object by program.
thanks.
TextObject1.Format = new FastReport.Format.NumberFormat();
Under the same circumstances,
the number is displayed as say - 152653.00
but I want to display as - 1,52,653.00.
Thanks in advance.
You need to write own script function that does such formatting. You may call it in the Text object then:
[MyFunc(152653)]
Hi Alex,
I tried but could not figure out how.
Can you give some code examples.
Thanks
I have found a way.
text1.Text = String.Format("{0:0,0.00}", debitBalance);
Thank You.