I am using SQL Server 2008 and I want to show 1 single field from a table in multiple columns in the report. Just like if I were to print labels. How can I achieve this?
Example:
Instead of printing:
Names Report
Andrea
Austin
Barbara
Bob
Bruno
Cathy
Chis
…
I want to print in columns (say 3 fixed columns):
Names Report
Andrea —- Bruno —- Darren
Austin —- Cathy —- Francis
Barbara —- Chis —- Gabriel
Bob —- David —- Gerald
……. —- ……. —- …….
Edit: If I run the report and click on “Print Layout” button, I can see multiple columns. Can I set this mode as default?
Use the ‘Report’ menu in Visual Studio and select ‘Report Properties’. You can set columns in the ‘Layout’ tab.
Try this msdn article about newsletter-style reports for more details: http://msdn.microsoft.com/en-us/library/ms159107.aspx
This method does have a limitation though so in some cases it might not be applicable:
EDIT:
So one approach is to use multiple tablix with a filter that checks RowNumber and accordingly displays particular records in each table.
The other way is called Newsletter-style report (link). This formatting is retained only when report is exported as PDF or Image. It can be previewed only when you select ‘Print Layout’ on the Preview tab in Visual Studio. Here is an example:
SELECT ID,NAME FROM TABLENAMEAs noted in points 5 and 6 – since the report body flows into multiple columns, you must ensure that the page size is at-least equal to -> ([Original report body size times the number of columns] + all the column spacing values). Otherwise it will look messy.