views:

1317

answers:

5

I have a matrix in SQL reporting and I would like it to print on an A4 page. If the matrix has less than 4 columns then it fits but for more than 4 columns I would like the matrix to wrap and show only 4 columns per page. Is this possible? I am using SQL Reporting 2005 in localmode.

A: 

I don't think so. I've found that exporting to excel then printing was the most flexable way of printing SSRS matrix reports I've found - esp. since most of my users know excel well.

Booji Boy
+1  A: 

I found a work around:

  1. First I added a field to my datasource called column count. Because the datasource is built in a business object it was easy for me to tell how many columns of data there is.
  2. Next I created a list on my report and moved my matrix into the list.
  3. I made the group expression =Ceiling(Fields!ColumnCount.Value/4) for the list.

In short I am telling the list to break every 4 columns. This causes the matrix to be split after 4 columns.

This will not work in all scenarios and probably screws up subtotalling but it worked for my application.

Disclaimer: this was not my idea...I adapted it from Chris Hays's Sleezy Hacks.

MBoy
+1  A: 

There is no way to intrinsically wrap columns; Mboy's solution above is very similar to what I have done in the past so I won't repeat his steps here, although I will warn you: for matrices with a large number of columns you will grow the number of pages in your report exponentially. In your case this may not be a problem; but we have found that in most cases it is cheaper ( in terms of page output) not to wrap columns.

Causas
A: 

According to MSDN, Tablix data regions do pagination horizontally in much the same way a table does it vertically, which is to say you can specify a page break on a group change. There is another MSDN article that suggests the use of a pagination expression, but this technique is already explained by MBoy so I won't repeat it, except to say that it is an endorsed technique.

Peter Wone
A: 

Hi, I want to make three tables in a reports as matrix and has to display one matrix after first one and only 4 rows for each matrix table. How can we do this? THanks, Sreejith

Hi sreejith...it would probably be better to ask this as a new question. You will get more response.
MBoy