SSRS fitting Tablix to exported pdf page
Asked Answered
P

3

11

I currently have a Matrix within an SSRS report. Usually, the matrix will fix to a standard page in portrait mode, however there are cases where the length of the columns will exceed a page. Is there a way to have SSRS render the report to a PDF where this Matrix would auto-size and shrink all of it's contents, ie: font, column widths to fit within a page? I don't want to shrink all objects in the SSRS report to fix the page, just the width of the Matrix.

Peaceful answered 20/4, 2012 at 13:59 Comment(0)
E
0

If you were dealing with height, I would say that that's not a tablix configuration. The tablix would be only expanding because of the columns. And the columns would be expanding because the textboxes that are inside them expand.

So, you would need to deal with it on each textbox by Right clicking the textbox inside the column and select "text box properties". On the general tab uncheck "allow height to increase".

Strangely there isn't an option to width. This link tells about the CanGrow and CanShrink properties but I wasn't able to make it work. Maybe if you want to give it a try.

Excavation answered 20/4, 2012 at 16:32 Comment(2)
Hi @Excavation - I've tried setting the CanGrow to false and CanShrink to true, to see if that would help size all of the matrix textboxes to their minimal amount required for column width, but it didn't make any difference. Ultimately, I just want the width of the Matrix to fit to a width of 8inches, regardless of if 5 columns are created from the dataset or 30 columns are created from the dataset.Peaceful
Hi @Peaceful I have been in the same situation before, after playing with all different combinations, I ended up converting it to A4 landscape or(higher page width so that it wont overlow). Don't ask me why, but do try with different ones (tablix and matrix) and see wrapping is occuring in either case or embed the tablix inside a rectangle. I once solved the issue, but now I am not able to recall the exact procedure.Nestor
P
0

-> Go to report tab -> Select the Report Properties -> Select Paper Size "Letter" and "Width & Height" as per standards ("8.5 * 11" or "11*8.5")

Profit answered 1/7, 2013 at 9:25 Comment(0)
C
0

Despite the downvote, Nawaz has the correct answer

To fit it to a specific page, especially for pdf output, then you set the size to A4. I always have three templates for this purpose, screen, pdfland and pdfport. I resize my headers, footers, titles and corporate imagery for each of these templates. It's a pain, but you can incentivise your users to ditch the pdfs and the printing and the paper by creating decent dashboards for them so they have live data to hand. That's really the only decent way I've found of getting them out of old and poor habits

So either right click outside the body of the report and select Report properties, or select it from the properties window tab at the right of the screen, then set the size to either letter or A4. It's not ideal, but if you do not limit the report size in this manner any dynamic columns will render outside the pdf and create multiple pages that need to be stuck together later

edit: If you really need to resize in a hurry, you can open the report as code, and use the replace function to reduce the size, however it is often easier to reposition the tables by hand

Cannon answered 2/12, 2016 at 16:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.