How to check for #error when using Split in textbox expression

Hello all,

I have a dataset in a report that is returning a field which contains a comma-separated list of values. I want to display the first value in textbox1, the second value oin textbox2 and so on.

In textbox1 I use the expression

=Split(Fields!CSVList.Value, ",")(0)

In textbox2 I use the expression

=Split(Fields!CSVList.Value, ",")(1)

However, when the data in the field CSVList only contains one value, then Textbox2 displays #ERROR when the report is run.

How can I avoid displaying this error when there is no corresponding value in the Split array?

Thanks in advance.

more ▼

asked Feb 22, 2012 at 01:01 PM in Default

avatar image

905 60 64 68

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

1 answer: sort voted first

@xnl28 Unfortunately, you are not doing it the right way. This seems to be the typical requirement of the matrix. Send the dynamic data from the SQL Server and handle it in SSRS with a Matrix.

Following are the links to help you out for the matrix implementation



more ▼

answered Feb 22, 2012 at 03:27 PM

avatar image

1.7k 1 5 10

(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: Feb 22, 2012 at 01:01 PM

Seen: 1325 times

Last Updated: Feb 22, 2012 at 03:54 PM

Copyright 2018 Redgate Software. Privacy Policy