0
votes

Hi I'm using the SSRS report builder 2012 where I have a data set that has a field content as a text separated by delimiter ;

I'm trying to split the text and display it in another matrix table each value takes each column and limit the column size to 10 and create a new row after reaching ten column size.

Is it possible to do it in SSRS or can I use a query on existing dataset and retrieve all the text by splitting it into rows in SQL

update:

My Dataset pull information from stored procedure which has a field called ReceiptText

Let say the ReceiptText field has content that looks like below

ABC ; CDF ; EFG ; HIG; KLM; NOP ; QRS; TUV; WXY; Z ;123 ; 456; 789

And I expect the result on the report looks like something below in a matrix table with each value in each column with 10 as max column size and add a row if it exceed the column size

ABC CDF EFG HIG KLM NOP QRS TUV WXY Z

123 456 789

2
If Miguel's comment doesn't help, post some sample data and expected resultsAlan Schofield
added update for what I'm looking for, I was able to split the text but not sure how to display it in a table and break it on ten column width@AlanSchofieldRaj K

2 Answers

0
votes

This is possible, but if you're new with SSRS it's going to be confusing and hard to explain. Basically you're going to want to design your table with your receipt ID as a row group. Beside receipt ID add two rows (within the receipt row group) with ten columns. In each column you'll put an expression that checks the character length and gets the substring if it's long enough.

If the items in row2 all return blank it shouldn't render. If that doesn't work you can add a row visibility filter that will only display if the substring of receipt ID is long enough for it to have data.

This is the best solution I can think of for this.

0
votes

You can split the text in an expression using the following code:

=Choose(1,Split(Fields!RECEIPTTEXT.Value,";"))
=Choose(2,Split(Fields!RECEIPTTEXT.Value,";"))

etc.

You can use these expressions in each of your column groups.