I inherited an SQL Reporting Services .rdl project from somebody and need help fixing some functionality. In each row of the report, there is a subreport. In order to save space the subreport is divided into 3. Such that in each row of the report, it splits the data of the subreport into 3 smaller tables. Right now, it fills these 3 subreports horizontally. (ie. if the result has 9 values, the first subtable will have 1, 4 & 7, the second subtable will have 2, 5 & 8, etc) Is there a way to have it fill the subtables vertically? (ie. the fi开发者_高级运维rst subtable would have 1,2 & 3)
Thanks!
By default, the multi-column reports should fill vertically. In fact, there isnt even an option to fill horizontally so i'd like to know how it is being done. Perhaps the underlying query has been modified?
In fact, I took a deeper look into the query and it turns out that the column number is being passed as a report parameter and the results are being reordered using a modulo on the column number. I don't have it with me right now, so I don't have the exact syntax.
More info for anyone trying to do this: it turns out that the subreport query gerates a column which indicates the row number
ROW_NUMBER() OVER (PARTITION BY columnName ORDER BY otherColumn) AS RowNumber
Then in the report, the subreport is included 3 times. Each subreport has a report parameter called Column, the first one is of value 1, the second 2 and the last one 0. The subreport then has a filter on it
=RowNumber Mod 3 = Column
that way the subreport results are divided into 3 supreports that can all be placed on the same row to save space.
精彩评论