2
votes

My SSRS report name is, TestReport.rdl. I would like to use this report name as the report title. In text box -> Expressions -> I need to convert "TestReport" to "Test Report".

In expression if I give =Globals!ReportName, the name of the report(TestReport) gets displayed in the text box. But, I need to insert a space between Test and Report. Is it possible to do it using expressions in SSRS?

I am getting syntax error when I try to use regular expression like, =System.Text.RegularExpressions.Regex.Replace

1
I know if you use a placeholder within the textbox and set its Markup Type as HTML, you can use the HTML   to insert a space.Kidiskidvogingogin
You can make one dataset and from SQL Server you can achieve this thing. let me know if you need more help.pedram

1 Answers

0
votes

Here you go, try this:

=System.Text.RegularExpressions.Regex.Replace(Globals!ReportName, "(?<=[a-z])([A-Z])"," $1")

This is my report rdl name:

enter image description here

Now this is the output using the expression above.

enter image description here

Note: The basis to separate the rdl name is the upper letter. So if your rdl name are all small letters it will not separate. The next word should start with upper letter to be separated.