Problem Statement:
How do you use SQL Server Reporting Services (SSRS) expression to get sub-string from the inputted text?
Solution:
I am going to show you few SSRS expressions that you can use in your SSRS reports:
Here’s the same in a text:
Input: | SSRS Expression used: | Output: | ||||
[Date].[Fiscal Year].&[2008] | Split(Parameters!DateFiscalYear.Value,”&”)(1) | [2008] | ||||
[Date].[Fiscal Year].&[2008] | Split(Parameters!DateFiscalYear.Value, “.”)(2) | &[2008] | ||||
[Date].[Fiscal Year].&[2008] | Split(Split(Split(Parameters!DateFiscalYear.Value, “&”)(1),”[“)(1),”]”)(0) | 2008 | ||||
[Date].[Fiscal Year].&[2008] | Parameters!DateFiscalYear.Value.Split(“&”)(1) | [2008] |
Conclusion:
In this post, you saw how to use the split function in SQL Server Reporting Services (SSRS) expressions to get a sub-string.
Hello, I am working on Microsoft Report Builder
I need to show in my report a set of data that comes in a text string separated by “,” (comma)
I have a field where what I need to separate comes from like this:
data1, data2, data3
and I need to show them in the report like this (in the same column)
data1
data2
data3
I mean leave a line for each item in the split.
Split (Fields! Data.Value, “,”) (0)
I have tried this, it only shows me the value of position 0.
Could it be done somehow? thanks!