0

I'm creating a ssrs report from a ssas cube. when i click on the excel cell it passes the values to SSRS parameter list and i need to split the string and place each value on a variable in the stored procedure. The string that i receive will be in the following format.

[Company Branch].[Reg - Comp - Bran Name].[All]
[Company Branch].[Reg - Comp - Bran Name].[Region Name].&[EU]
[Company Branch].[Reg - Comp - Bran Name].[Region Name].&[EU].&[LDE]
[Company Branch].[Reg - Comp - Bran Name].[Region Name].&[EU].&[LDE].&[LDE]&[HAM]

The value may be in any one of the format. now my requirement is to split the string and place each value in a variable.

Eg. @region="EU" @company="LDE" @branch="HAM" And if the value is all then i need to have ALL in each variable. If i receive only region then the company and branch has to be null.

MUmla
  • 445
  • 1
  • 8
  • 26
Remi
  • 214
  • 5
  • 17
  • So, you want to split the string inside SSRS and then pass them as arguments to the stored procedure? The question is unclear, where do you want to spit them? – Daniel B Aug 08 '14 at 07:29
  • I need to do it in a stored procedure and manipulate the string in data base. Let me know your suggestion. Which would be an easier way?? i need to use the procedure for many reports so i would prefer Stored procedure. – Remi Aug 08 '14 at 07:32
  • At the stored procedure create one parameter to pass the one string that is delimited. Use SQL in the stored procedure to split and process. [example split](http://stackoverflow.com/questions/10581772/how-to-split-a-comma-separated-value-to-columns). – Tak Aug 08 '14 at 12:43
  • Thus, is the following assumption correct: Your users use Excel, click on a cell, which calls an SSRS report, which in turn calls a Stored Procedure hosted in SSAS, and this procedure needs to split the value? If so, why do you need the split values at all? And is your question how to write the procedure, or how to pass the parameters from Excel to SSRS, or how to pass the parameters from SSRS to the SSAS stored procedure? – FrankPl Aug 14 '14 at 18:03

0 Answers0