Saturday, February 25, 2012

Displaying a List Horizontally

Hi All,

I'm new to reporting services and I need some help. I've created a list which contains a photo and user name. Currently, it displays all the information I want however, the list expands down the page in one column. I would like it to expand across the page horizontally (4 columns) and then skip down to the next line. Can someone tell me how to do this using report designer? Thank youReporting Services doesn't support listing horizontally natively.

You could workaround by trying something like the following (conceptually this is easier to understand):
1) inserting a constructed column in your dataset (right click on your fields windows and select add)
2) set the value of the constructed column so it increases by 1 for every 4th value of RowNumber()... maybe =Floor(RowNumber()/4)
3) Add another constructed column in your data set
4) set the value to be the remainder =Mod(RowNumber()/4) this should give values from 1 - 4.
5) add a grouping to your list based on the constructed column created in #2
6) Add 4 lists into your list. Let's call these "inner lists"
7) for each inner list, add a filter on for the appropriate value of the constructed column created in #3.
8) in each inner list display your data the way you want it to look

(take a coffee break cause this was hard :-))

You might also be able to do something similar with a Matrix control where you put the constructed column in #4 as the column grouping and the constructed column in #2 as the row grouping. A little harder to understand maybe but probably easier to maintain in the long run.

Good luck,
-Lukasz|||I'm trying to use the solution provided by lukasz but I seem to be getting an error when creating the constructed field as suggested:

A sort expression for the field ‘=RowNumber("table")’ uses the function RowNumber. RowNumber cannot be used in sort expressions.

Anyone have any idea why?

Thanks.

|||

Hello,

This does not work for me as well. I get the same error as described by Pumm3l.

Can someone please provide a reliable answer?

Thanks.

No comments:

Post a Comment