Jidheesh Rajan
Jidheesh Rajan

Reputation: 4845

String Split in SSRS Report

I have string "02Years02Months". In the SSRS Report i need to show the string like

"02 Years 02 Months". Is there any good method in SSRS report Expression.

Please advice, Thanks

Upvotes: 3

Views: 421

Answers (2)

Jidheesh Rajan
Jidheesh Rajan

Reputation: 4845

I found the solution, Here is the answer

=Left(Fields!Value, 2) & " " & Mid(Fields!Value, 3, 5) & " " & Mid(Fields!Value, 8, 2) & " " & Right(Fields!Value,  6)

Thanks for the support

Upvotes: 2

lethaljd
lethaljd

Reputation: 500

=Left(Fields!String.Value, 2) & " " & Mid(Fields!String.Value, 3, 7) & " " & Right(Fields!String.Value, 6)

That's assuming your numbers will always be padding with zeroes as in the example above, and given you replace the Fields!String.Value with the field containing the string being returned in your report.

Upvotes: 3

Related Questions