Last post Sep 24, 2013 03:49 PM by igelin
Jun 25, 2013 01:05 AM|jessbanaga|LINK
I have a problem splitting a parameter separated by comma but the value contains comma also.
@Var1 = 'organization 1,organization 2,organization 3,organization 4,organization 5, inc.'
The problem is Organization 5, inc. The comma before the word inc. is causing me problem. How do you handle this guys?
BTW, the parameter is passed from SSRS rdl parameters to SQL Stored procedures.
Jun 25, 2013 02:50 AM|Rohit Rao|LINK
in that case you have to split parameters by semicolon (;) or other special characters.
Jun 25, 2013 11:29 PM|jessbanaga|LINK
Is that possible in SSRS? I've been looking on how to do that in SSRS report designer but failed.
Jun 25, 2013 11:42 PM|Rion Williams|LINK
You would require some kind of additional delimiter in order to determine where you should perform your
Split() method at. (This documentation is for C# / Visual Basic, but the basic functionality is the same)
Perhaps when you are actually building this single string consider adding in some value that will not be contained within your strings to use as a delimiter such as an asterisk :
organization 1*organization 2*organization 3*organization 4*organization 5, inc.
The Split() method syntax functions a bit different within SRSS (as seen in this Stack Overflow discussion) but would roughly resemble the following :
//Accesses the first value ("organization 1")
//Accesses the second value ("organization 2")
However, as previously mentioned when you are building this string you'll need to use some other type of delimiter and append it between each of your values within your string.
Jun 26, 2013 02:49 AM|jessbanaga|LINK
I already have the Split function in SQL Server. I think what's needed is the way SSRS concatenate the selected parameter values so that it will not use the comma ( , ) delimited but something like a semicolon ; character.
Sep 24, 2013 03:49 PM|igelin|LINK
Try the Join function.