I am using SSRS Report
and I need to define a Custom Number Format
for Tablix Textbox.
For example:
Convert 012123456
To 012-123456
.
How can I do this by using custom number format or by using FORMAT
Please suggest me!
Thanks
I am using SSRS Report
and I need to define a Custom Number Format
for Tablix Textbox.
For example:
Convert 012123456
To 012-123456
.
How can I do this by using custom number format or by using FORMAT
Please suggest me!
Thanks
Firstly, I have tried below as per this post, but no success.
=Format(Fields!Number.Value,"000-000000")
=Format(Fields!Number.Value,"###-#######")
Then I tried something like below and working fine now.
=Format(CDbl(Fields!Number.Value),"000-000000")
I can use this, =Format(CDbl(Fields!PA_File_Number.Value),"###-######")
but output would be 12-123456
and I want 012-123456
.
Here, CDbl()
is required as my Number
column datatype is varchar()
Maybe you need change format style
"###-######"
to
"0##-######"
"(0). Digit placeholder. Displays a digit or a zero. If the expression has a digit in the position where the zero appears in the format string, display it; otherwise, displays a zero in that position." Additional information about various placeholders you can find on then MSDN page (https://msdn.microsoft.com/en-us/library/4fb56f4y(v=vs.90).aspx)
One Simple way is described below
=Format(Fields!FieldName.Value,"Any Format here...")