Search code examples
sql-serverreporting-serviceslocalreport

How can you absolutely position each row in a dataset in a SSRS report?


I have a SSRS local report and I need to display a list of addresses. Naturally, they need to be formatted to look how addresses should. There will never be more than 10 and could be as low as zero. I am thinking like 3 rows of 4 or 4 rows of 3 to maximize the real estate.

I have a few ideas but they all seem, well, there should be a better way:

  1. Format the entire text in sql and return it in a large text box in the report.
  2. Create an object with 3 properties that are strings. Every three would fill each property and the next would be a new row. This would create four rows of three strings. I could create a table with each property being the column.
  3. Somehow use a pivot table (or few to turn the rows into columns. This would be similar to #2.
  4. See if a matrix could do this. (I don't think it can)

Does anyone have any better ideas or perhaps a best way of doing one of these?


Solution

  • I found a similar post to what I wanted here: SSRS - How to build a simple multi-column report?.

    I added four vertical lists to the page all pointing to the same dataset. I put a textbox in each single cell of the listbox with the fields for the address formatted how I wanted. I then set the visibility for the tablix/rectangle to =IIf(RowNumber("DataSet1") Mod 4 = 1, False, True) with each list having Mod 0 through 3 respectively.

    I'm not marking this as a duplicate since the other answer suggested using the filter expression or changing the report layout properties which did not work for me.

    I hope this helps someone else.