SSRS report formatting a table to display data side by side

和自甴很熟 提交于 2019-11-29 14:07:41

To print your data from left to right in a multi-column format, you need to fake it using multiple tables. To implement this hack, create the same number of tables as columns you want side by side that all point to your data set. On the Detail row of the first table, for the Visibility-Hidden property use the following formula:

=IIF((RowNumber(Nothing) Mod 4) = 1, False, True)

where 4 is the number of tables (columns) you have.

Do the same for each table, incrementing what the formula is equal to (so for the second column (RowNumber(Nothing) Mod 4) = 2 and so forth). In the last table (column) the formula equals 0.

This alternately hides the detail row, only displaying the appropriate rows for that column number.

You can achieve that look with query.

SELECT std1.id AS Student_Id, 
        std1.NAME AS Student_Name, 
        std2.id AS Student_Id, 
        std2.NAME AS Student_Name
FROM students std1, students std2
WHERE (std2.id - std1.id = 1 
       AND std1.id %2 = 1);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!