I have created an SSRS Matrix report which shows 3 pages in output but when i export the report as a PDF, it shows 6 pages. One page is blank, although i selected the option ConsumeContainerWhiteSpace as True but still it is giving me a blank page as well the output pages are more than what is being shown in preview. I am using VS2013, kindly suggest.
As some comments have already suggested you will need to do a bit of trial and error with your page layout, page size and report contents to ensure that there is no white space pushing onto other pages.
The easiest way I have found to do this is to use the Print Layout option when previewing the report in Report Builder (In the middle of the Ribbon when viewing the report preview), which previews the report as it would be exported to actual pages. If it is still not obvious as to why the blank pages are there, you can set different background colours to your report items and report itself to see which colours show on the 'blank' pages. This will show you whether it is a report item or the report page layout that needs to be adjusted.
Your tables are running over more than likely.
Click ruler button in toolbar and make sure width of tables + margins is less than 11 if landscape and 8.5 if potrait.
Also if you right click outside of the report and select properties You can check your margins. I like to use between 0 and .5.
I have couple of SSRS reports deployed to test server.
The report layout/formatting looks OKAY on the screen but when I export to PDF and view in PDF, everything is messed up.
For example, I see two columns shown in separate page. Even one of the tablix region comes up separately in another page.
So totally one page on-screen display comes to PDF in about 3 to 4 pages.
Also the 2nd and 3rd pages are always blank.
Did I mess up the report defination or any width/height parameters? The report is set to print in landscape and is in inches.
Any help is appreciated.
Thanks.
You probably need to increase the page width, from the Report menu. This will keep all your columns on a single page. As for blank pages when report is exported to PDF, you will have to squeeze out all white space while designing the report. The size of the canvas should not be more than what is just needed. If you have groups on your report and there are page breaks separating each group, setting the ConsumeContainerWhiteSpace property of the Report to true will ensure there are no blank pages at the end.
I created a report in reporting services 2005 with a report page size of 14in x 8.5in. The report looks fine in the reports manager and also in the report viewer. The issue is when I export the report to PDF, the page size in Adobe states 14 x 8.5 in but when you hit the print button, it selects Letter size (8.5 x 11) instead of choosing Legal size (8.5 x 14).
If you then click on 'Choose Paper Source by PDF page size' or change the paper source to legal, the report prints out exactly the way I wanted it.
Does anyone have a solution to this? Thanks in advance
I remeber we had a similar problem a few months ago with Reporting Services 2008 (not 2005).
I think the solution was to "force" the values of Width and Heigth for the desired amount, regardless of the selected item in "Paper size" dropdown box (in Report Properties -> Page Setup)
In our case, we wanted to print in A4, so we set width = 21.59cm and height = 27,94cm, even if selected paper size remains as "Letter".
Just i choosed the Report Properties -> Page Setup --> Paper Size is A4 , then it was get working fine for A4
- GAM SKJai (L&T ECC)
I've had this problem too, and I've never found a satisfactory solution. SSRS doesn't offer much control over print settings in export formats (like fit-to-one-page-across in Excel).
One work-around would be to roll your own interface, intercept the PDF file, and update the print settings before serving it up to the user. Could be a lot of work, and how would you know the intended page size? You could always parse the RDL file for the page size settings, and that would be a correct solution, but damn if that's not a lot of extra work.
EDIT: check the page size under page setup, as pv2008 suggested.
Report Properties --> Interactive Size set it to whatever you want and it stays, even after closing and reopening the report. I exported pdf and it retains the size. You can check by right clicking on the pdf and go tot properties.
What is the best way to make the SSRS reporr fit in to PDF page.
Next time please indicate what version of SSRS you are working with...
If you are careful to design your canvas to certain constraints your should be fine. Typically the PDF is going to emulate a 8.5" by 11" piece of paper - considering margins you should keep the width of your report to less than 7" but I think 6.5" is best.
You can do this by selecting the report itself, the menu in BIDS (VS) should now have a report item which you can select to reveal Report Properties. In the report properties you can select the orientation as well as standard paper sizes and margins. Based on your paper size and your left and right margins you should be able to calculate the maximum width for the body of your report. Back in the report designer select the report body and look at the properties. The object drop down list should specifically say BODY, in this you want to ensure the size of your body (width) is not greater than the Report width minus the margins.
For PDF you have to change page settings while creating report check below steps for that :
if you have large data on page you should choose below option
->Right Click on report
->Click on Page Setup option
->Change page orientation Portrait to Landscape
->Click on OK
if you don't have large data on page you should reduce size of your table on report design page and change below setting:
->Right Click on report
->Click on Page Setup option
->Change page orientation Landscape to Portrait
->Click on OK
Now check PDF file.
I have a two-page SSRS report. When I exported it to PDF it was taking 4 pages due to its width, where the 2nd and 4th pages were displaying one of my fields from the table. I tried to set the layout size in report properties as width=18in and height =8.5in.
It gave me the whole table in a single page of PDF, but I am still getting the 2nd and 4th pages blank.
Is the way I am doing it incorrect? How else can I get rid of those blank pages?
In BIDS or SSDT-BI, do the following:
Click on Report > Report Properties > Layout tab (Page Setup tab in SSDT-BI)
Make a note of the values for Page width, Left margin, Right margin
Close and go back to the design surface
In the Properties window, select Body
Click the + symbol to expand the Size node
Make a note of the value for Width
To render in PDF correctly Body Width + Left margin + Right margin must be less than or equal to Page width. When you see blank pages being rendered it is almost always because the body width plus margins is greater than the page width.
Remember: (Body Width + Left margin + Right margin) <= (Page width)
Another thing to try is to set the report property called ConsumeContainerWhitespace to True (the default is false). That's how it got resolved for me.
After hours of struggling with this problem, I stumbled upon a solution that worked for me:
In SSDT (2012), I had originally had my Page Setup/Page units set to Centimeters. When I changed this to Inches, strangely enough, I was able to export my report to PDF without having every other page be blank.
It is better to do this on the design surface (Visual Studio 2012 is shown but can be done in other versions) first before calculating any maths when editing an SSRS document.
Below the following numbers in red circles that map to these following steps:
In the design surface, sometimes the editor will create a page which is larger than the actual controls; hence the ghost area being printed.
Resize to the controls. Visually look at the width/height and see if you can't bring in the page on the design surface to size it to the space actually needed by the controls and no more.
Then try to create a PDF and see if that fixes it.
If #3 does not resolve the issue, then there are controls requiring too much of the actual page size and going over in either length/width. So one will need to make the size of the controls smaller to accommodate a smaller page size.
Also in some circumstances one can just change a property of the report page by setting ConsumeContainerWhitespace to true to automatically consume the spaces.
The problem for me was that SSRS purposely treats your white space as if you intend it be honored:
As well as white space, make sure there is no right margin.
If the pages are blank coming from SSRS, you need to tweak your report layout. This will be far more efficient than running the output through and post process to repair the side effects of a layout problem.
SSRS is very finicky when it comes to pushing the boundaries of the margins. It is easy to accidentally widen/lengthen the report just by adjusting text box or other control on the report. Check the width and height property of the report surface carefully and squeeze them as much as possible. Watch out for large headers and footers.
I have worked with SSRS for over 10 years and the answers above are the go to answers. BUT. If nothing works, and you are completely stuffed....remove items from the report until the problem goes away. Once you have identified which row or report item is causing the problem, put it inside a rectangle container. That's it. Has helped us many many times! Extra pages are mostly caused by report items flowing over the right margin. When all else fails, putting things inside a rectangle or an empty rectangle to the right of an item, can stop this from happening. Good luck out there!
In addition to the margins, the most common issue by far, I have also seen two additional possibilities:
Using + to concatenate text. You should use & instead.
Text overflowing the width of the specified textbox. So if your textbox only holds 30 characters and you try to cram 300 in there, you might end up with extra pages.
Have you tried to see if there is any white space on the right of your report? If so you can drag it back to the end of your report and then drag the report background back to the same spot.
On the properties tab of the report (myReport.rdlc), change the "Keep Together" attribute to False. I've been struggling with this issue for a while and this seems to have solved my issue.
I recently inherited a report that I needed to make a few changes. After following all the recommendations above, it did not help. The report historically had this extra page, and nobody could figure out why.
I right clicked on the tablix and selected properties. There was a checkbox checked that said add a page break after. After removing this, it prints on one page now.
I fixed this issue by doing the following. ( Using the latest version of Report Builder )
Step 1.) Go to View Tab
Step 2.) Check the Properties checkbox
Step 3.) Click inside the body of your report (it will update values in properties tab)
Step 4.) Take not of the width here
Step 5.) Right click in the gray area outside the report and click report properties
Step 6.) Add your left + right margin to your body width ( if that equals 10 then make your width 11)
Step 7.) Save
If your report includes a subreport, the width of the subreport could push the boundaries of the body if subreport and hierarchy are allowed to grow.
I had a similar problem arise with a subreport that could be placed in a cell (spanning 2 columns). It looked like the span could contain it in the designer and it rendered fine in a winform or a browser and, originally, it could generate printer output (or pdf file) without spilling over onto excess pages.
Then, after changing some other column widths (and without exceeding the body width plus margins), the winform and browser renderings looked still looked fine but when the output (printer or pdf) was generated, it grew past the margins and wrote the right side of each page as a 2nd (4th, etc.) page. I could eliminate my problem by increasing colspan where the subreport was placed.
Whether or not you're using subreports, if you have page spillover and your body design fits within the margins of the page, look for something allowed to grow that pushes the width of the body out.
Make sure the designer in visual studio is not going beyond your max width. Hover over the right page border and drag to the left to make sure the page does not go over your desired layout.
I just reduced all elements Width shorter than 8 inch and it is being corrected,
I did that with mouse,
your report Body should be shorter than 8 inch.
I've successfully used pdftk to remove pages I didn't want/need in pdfs. You can download the program here
You might try something like the following. Taken from here under examples
Remove 'page 13' from in1.pdf to create out1.pdf
pdftk in.pdf cat 1-12 14-end output out1.pdf
or:
pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf