Monday, February 28, 2011
SSRS: Column Duplication (Fixed Columns) on Printouts
This blog post covers implementing something like the "fixed columns" in excel which allow you to have a column (or columns) repeat on multiple pages. This only happens whey you view the report in a non-interactive way (i.e. not when viewing online).
This blog post was put together using SQL Server 2008R2 and Report Builder 3 but it might be applicable to other versions.
Open your report in Report Builder (I'm using 3.0) and add in your duplicate column (you will need to do some sizing - for example setting up your printer format to A4 or US Letter and expanding your page 1 columns to cover the entire width of the page);
After you have added in your duplicate column select the column, right-click the heading and select "Column Visibility";
Enter the expression;
Into the "Show or hide based on an expression" entry box.
The column will now only appear when the report is not being viewed interactively (to test you can click "Run" and then choose "Print Layout").