0

How could I Split comma " , " seperated values in a cell to get value into adjacent different column with same column header in SSRS I got a query table in SSRS report as follows

ProjectNo.    |    ProjectName      |      Client             |        Programmers  |

01            |    ave              |       rowan, Zica       |        A, B, C      | 

Now I want to display this in SSRS as Follows -

ProjectNo.  |  ProjectName  |   Client               | Programmers               |                            
01          |    ave        |   rowan     |  Zica    | A           |  B   |  C   |           

Any suggestion How could i achieve this only using SSRS ,and not modifying the query...

Dee Law
  • 78
  • 1
  • 6

1 Answers1

0

You would need to enter an Expression in each of the subsidiary cells which would use the Split function to return an array of substrings from your query column. The expression would be the same in each subsidiary cell other than the index of the element you want to return from the array.

Hope that helps - let me know if you would like an example.

  • Yes ... please, help is Highly Appreciated and with examples it means a lot ..thanks.. btw I used Split function --=Split(Fields!Programmers.Value,",").GetValue(0) --- but in vain as error is displayed – Dee Law Apr 24 '14 at 11:03
  • So in your example above for Programmers, expressions would be: - Column 1: =Split(Fields!Programmers, ",")(0) - Column 2: =Split(Fields!Programmers, ",")(1) - Column 3: =Split(Fields!Programmers, ",")(2) – Julian Joseph Apr 24 '14 at 11:09
  • Have you tried using Split with the syntax as shown in my comment above? I don't think you need to use GetValue. What error are you getting? – Julian Joseph Apr 24 '14 at 13:08
  • 1
    I got this solution and it works...-- http://social.msdn.microsoft.com/Forums/en-US/92069abb-13f1-45bc-b5cc-2c7dfdacc365/need-help-on-ssrs-split-function?forum=sqlreportingservices – Dee Law Apr 24 '14 at 13:58
  • Of course, you need to allow for situations where your comma-delimited data value has less than 3 elements! Good solution. – Julian Joseph Apr 24 '14 at 14:03