views:

6145

answers:

3

Hi,

I have a SSRS report. When i tried to export to PDF it was taking 4 pages due to its width., where the 2nd and 4th pages were displaying one of my field from the table. So 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 getting 2nd and 4th page blank. Is the way I am doing is incorrect or else how to get rid of that blank pages. Please give some ideas.

Thanks in advance. Brijit

A: 

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

vinc456
+4  A: 

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.

HectorMac
+11  A: 

In BIDS, do the following:

  1. Click on Report > Report Properties > Layout tab
  2. Make a note of the values for Page width, Left margin, Right margin
  3. Close and go back to the design surface
  4. In the Properties window, select Body
  5. Click the + symbol to expand the Size node
  6. 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)

Nathan
Doesn't work. My body width is less than "Report width - margins". And still I have a ton of blank pages in there.
adolf garlic
Then the problem is likely to be elsewhere in your report - check the Page Break settings on all your report items.
Nathan
Worked perfectly for me. Great help! Thanks
Mr Grieves