Friday, March 9, 2012

Export to PDF Is a Mess

I have several reports on a report server that export to Excel just fine. When I export them to PDF, the columns don't fit, the font gets much larger and the columns that got cut off are put on extra pages. It is absolutely unusable. Any suggestions out there?

Hi, I had lots of problems with this when I was starting out.

I found that more often than not it was caused by the page property settings of the report found in report designer.

There are page size properties. check that these match the output you want.

e.g I want an A4 portrait output,so set it page witdh to 21cm; page length to 29.7cm

if it is A4 landscape I want the width = 29.7 length is 21cm

Also important in page properties are margins, most important are the left and right margins.

They are important because if in the designer the body of your report plus these page margins is greater than an A4 output then PDFs will spill onto other pages.

e.g Page property is a4 landscape 29.7width. Page margins are 2cm left and 2cm right. The width of the body of my report is 26cm.

I have a problem because :26(body) + 2(L margin) +2(R margin) = 30 which is greater the the page output property (29.7).

Solution: reduce the margins to 1cm each .

|||Yes, you are right. I found the margin settings and reduced all of them. The columns all appear on the same page now but there is a blank page between each page of the report. The blank page has only the header on it. I have the page size set to 8.5 x 11. Any ideas on that one?|||Width of your report content + left margin + right margin <=8.5 in your case. Defatult margin is 1in, so your report width should be 6.5in or less. If this is your case, you can either change margin size or reduce your content width.|||

I've got the margins working just fine now. It's the blank pages I can't figure out. I get a PDF like this:

Page 1: Header with data
Page 2: Header and no data
Page 3: Header with next data
Page 4: Header and no data

|||What is the width of your rdlc report and your margins from the report properties' Layout tab?|||

It's an .rdl report with these parameters:

Interactive size: 8.5in, 11in
Margins: 0.5in, 0.25in, 1in, 0.25in
PageSize: 8.5in, 11in

|||Thank you for giving me this. But what I want to know most is the ruler width (the top ruler of the report in the design view). This is the Width of the report.|||Sorry about that. The grid goes out to the 8" mark. Should I pull it in some?|||

Hello:

This is the problem. You page width now is 8+your margins. You need to reduce this 8 to make room for your margins. You will be fine after that.

|||Yes! I pulled it in to 7.75 and no more blank pages. I understand what you mean now. The report width cannot exceed the page width minus the sum of the margins. Iwas .25 off.

No comments:

Post a Comment