Splitt the comma delimited string in ssrs Expression

Hi, in my ssrs Report i need to disply assetnames one by one in textBox from comma separated string field I have field Assetname-------->(abc,pqr,xyz,.........) i want to disply Assetname in the textBox as like this abc pqr xyz ......... i.e, split the string where comma exist and disply one by on can plz help me to write expression?

more ▼

asked Oct 13, 2011 at 08:30 AM in Default

avatar image

14 12 14 15

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If you need to use expression for each box then you can use

 =Assetname.Split(",".ToCharArray())(0) ' for box 1' Text property
 =Assetname.Split(",".ToCharArray())(1) ' for box 2' Text property 
 =Assetname.Split(",".ToCharArray())(2) ' for box 3' Text property 
 =Assetname.Split(",".ToCharArray())(3) ' for box 4' Text property 
 ' etc

Usually though it would be better to tidy up a little and have a routine to do the split just once and return a string array, which members you can then use (to avoid calling a split every step of the way).


more ▼

answered Oct 13, 2011 at 09:56 AM

avatar image

20.3k 3 7 29

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Oct 13, 2011 at 08:30 AM

Seen: 2765 times

Last Updated: Oct 13, 2011 at 08:30 AM

Copyright 2018 Redgate Software. Privacy Policy