FernandoPaiva FernandoPaiva - 1 month ago 17x
C# Question

How to format number into reportviewer?

I'm trying format a number into ReportViewer. I want the number has the format

. To do this I'm trying use the format property of TextBox but still haven't success. How could I do this ?


=FormatNumber(Fields!terminal.Value, String.Format("{0:000}"))


The function FormatNumber is not going to do that for you.

Instead use the following expession in your TextBox

= Right("000" & Cstr(Fields!terminal.Value),3)

This will convert your value to a string, then add to the front 3 zero's and then return the last 3 chars of that string.

Don't set the Format property of the textBox.