Reputation: 4460
I'm trying format a number into ReportViewer. I want the number has the format 001
. To do this I'm trying use the format property of TextBox but still haven't success. How could I do this ?
trying.
=FormatNumber(Fields!terminal.Value, String.Format("{0:000}"))
Upvotes: 1
Views: 1131
Reputation: 42444
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.
Upvotes: 1