0
votes

The page width automatically expand on report which can't fit on the page. I wanted to stick to the regular letter for either landscape or portrait. Is there a way to lock it so it doesn't expand? If i can't lock the size of the page, is there some sort of flag or line that can show when you are over the set page width parameter?

1

1 Answers

0
votes

No. But you MIGHT be able to.

There's not a way to lock the report width like you want nor an indicator.

I assume you're using a matrix since I don't think there are any other objects that push the width of a report.

If you calculate your current width and count the number of Column Group fields that will fit in a page, you might be able break the table up into multiple tables dynamically by adding a ROW_NUMBER in SQL based on the Column Group and using a List object in SSRS to repeat the table as many times as needed based on the ROW_NUMBER.

Your ROW_NUM would be based of your columns. Each Column will have it's own ROW_NUM based on the SQL Server function:

ROW_NUMBER()OVER(PARTITION BY COLUMN FIELD ORDER BY COLUMN_FIELD) AS ROW_NUM

For the list (a List is just a table with one cell), you'll want to group the Rows on the number of columns that fit in one page. Let's say it's 5 for this example. You''l want every five columns to be on one page, so you group by your row_num divided by 5.

=INT((Fields!ROW_NUM.Value - 1) / 5)

So columns 1 - 5 will be 0, 6 - 10 will be 1, etc...

The List Grouping will now break up the data by every group of columns.

Just put your current table inside the list.