Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 360
Jidheesh Rajan Avatar asked Aug 06 '26 17:08

Jidheesh Rajan


2 Answers

=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.

like image 109
lethaljd Avatar answered Aug 08 '26 10:08

lethaljd


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

like image 42
Jidheesh Rajan Avatar answered Aug 08 '26 10:08

Jidheesh Rajan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!