본문 바로가기

카테고리 없음

Reportviewer Export Pdf Extra Page



Active5 years, 1 month ago

Export Pdf Free

VS 2010 Extra Blank Page On Rdlc Report Oct 21, 2011. Asp.net - RDLC Report Exporting To Pdf With Page Number In Footer May 27, 2011. Page Break On ReportViewer Make Extra Page When Printed? Feb 22, 2012. I'm using Report Viewer(VS 2008) to make a report in VB.net. I add Table with Table Header, Table Detail, and Table Footer. Apr 16, 2013  when i am trying to export my report to PDF it is giving some blank pages in every even page numbers. To over come this i have followed the two conditions as. Above rule1 and also i tried by making the body height is greater than the report height even the same issue that is an extra white page is comming at the right side of each. The setup: I am creating a report in my ASP.NET web application using the built in report and reportViewer from Visual Studio 2005. Everything seems to be going fine until I start to notice that when I export my report to PDF it now has an extra blank page after every page of data.

I have a report created in SSRS 2008 that I call from and display in an asp page using the ReportViewer Control. In the ReportViewer my report has an extra/blank page at the end, but when I export it to PDF my report is perfect!. Nothing gets off the page, margins and size are all fine, under 10.0 in for a landscape report. Any idea what could be causing this?

MonicaMonica

9 Answers

Short Answer: Try shrinking the vertical size of the Body so there is no whitespace below the last page item.

Long Answer: I had the opposite problem when using reportviewer to render a 1-page form letter. Reportviewer rendered it correctly (one page) in the browser, but the exported PDF added a blank page 2. The Body size in my .rdlc file was exactly 8.5 x 11 in. so I could see the margins. Shrinking the vertical size of the Body to remove the whitespace below the last item (9.8' in my case) fixed the problem. (The exported PDF still has a page size of 8.5x11.)

(Thanks jimconstable. I don't yet have the 'reputation' to vote for answers.)

PointZeroTwoPointZeroTwo

Is the report surface larger than the page? That will cause an extra page that might not be there in a pdf.

jimconstablejimconstable

This is usually caused because some of your page items.. text boxes, rectangles, lines, tables.. fall outside of the margins. I usually work on rather complex reports and what I have to do is put boarders (with different colors) on each thing that has an edge near the right hand of the page.. then when you preview, you can tell by the colors which thing is overflowing. Then you can re-size the objects or the margins until nothing overflows and the extra page is gone.

This actually happens a lot with sub-reports. They can push over textboxes, rectangles, lines.. anything.. that are placed to the right of them.

This can be an incredibly frustrating problem but I highly suggest adding colored borders to your report objects until you find what is spilling over. Sometimes - it can even be the canGrow property or it can be just white space left below your lowest report object so be sure to drag the bottom of the report body almost all the way up to the lowest object on your report (sometimes if the report body touches the lowest item that item's content can be cut off though, I always leave a little space, about the height of one of these letter's I am typing)

gloomy.penguingloomy.penguin

4,6736 gold badges27 silver badges58 bronze badges

I've been having a similar problem (though there was also a blank page in the exported .pdf for me), which I eventually solved by doing the following:

  • Opened up the .rdl file in my text editor of choice
  • Searched for <Width> / <xxxWidth> tags, and reduced all the values contained between these tags to be less than the value minus the width of the margins on each side.

For me, the problem width belonged to the top level <Report> element, and changing it didn't affect the appearance of the report.

Of course, the next thing to try would be doing the same with <Height> tags.

The latest version of BlueStork BS-WG-USB Wireless LAN Driver and Utility is currently unknown. Sfr.

JimiJimi

I had the same problem with a very simple report. My solution was in the Report PropertiesMargins, set all the margins (left, top, right, bottom) to zero. That shrinks the report width and height. Apparently the margins are outside of the page size, usually (8.5 x 11 in).

I hope this solve the problem.

PraxGTPraxGT

I also got the blank page at the end of report, but it disappeared in PDF. And I found that, if we uncheck the option 'Add page break after', the blank page will not appear in SSRS. But When we export to PDF, there are no page break in PDF.

Adobe Export Pdf To Word

Export

Paul Fleming

20.3k8 gold badges56 silver badges99 bronze badges
Ann LeeAnn Lee

There is a confusion there on the page design. Developers would think the report being designed is WYSIWYG, but actually it's NOT!! Microsoft reportviewer will take your designed page as the content!! and append the margins defined on the outside of your page, and turn out that your page can never fit in to one page!!

So, when you design a new report, focus on the content area, the client area, including your headers and footers, and allow margins to be appended on your outer border.

Lin Song YangLin Song Yang

I've found that removing the Column Group for a detail report solved the problem. Nothing else worked. I made sure the Body fit within the Page size, made sure there was nothing extending into a margin in the Header or Footer. I didn't need column grouping and the output was the same without it. It seems to be necessary when using the Report Designer but isn't necessarily needed for the resulting report.

MQuiggGeorgiaMQuiggGeorgia

You have to check that the width of the bofy in the 'Body properties' tab is not higher that the width of the page in the 'Report properties' tab, otherwise the last part of the body renders in another page. A4 size is 21cm x 29,7cm and make sure to consider the margins to calculate the max body size.

María Frances GaskaMaría Frances Gaska

Not the answer you're looking for? Browse other questions tagged reporting-servicesreportviewer or ask your own question.

Active29 days ago

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?

brijit

13 Answers

In BIDS or SSDT-BI, do the following:

  1. Click on Report > Report Properties > Layout tab (Page Setup tab in SSDT-BI)
  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 GriffithsNathan Griffiths

9,1532 gold badges22 silver badges40 bronze badges

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.

ΩmegaMan

17.4k5 gold badges51 silver badges68 bronze badges

ChrysalisChrysalis

3,6252 gold badges14 silver badges22 bronze badges

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.

sion_cornsion_corn

2,0807 gold badges28 silver badges48 bronze badges

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:

  1. In the design surface, sometimes the editor will create a page which is larger than the actual controls; hence the ghost area being printed.
  2. Resize to the controls. Visually look at the width/height and see if you can't bring in the pageon the design surface to size it to the space actually needed by the controls and no more.
  3. Then try to create a PDF and see if that fixes it.
  4. 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.

ΩmegaManΩmegaMan

17.4k5 gold badges51 silver badges68 bronze badges

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.

HectorMacHectorMac

5,4954 gold badges19 silver badges23 bronze badges

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.

Jeremy ThompsonJeremy Thompson

42k13 gold badges116 silver badges216 bronze badges

In addition to the margins, the most common issue by far, I have also seen two additional possibilities:

  1. Using + to concatenate text. You should use & instead.
  2. 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.

Joshua DrakeJoshua Drake

2,3432 gold badges30 silver badges52 bronze badges

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!

Excel

LucasFLucasF

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.

user2585349user2585349

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.

OmarOmar

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.

C# Reportviewer Export To Pdf

Bill1260231Bill1260231

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.

crh225crh225

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

English to korean dictionary. You will certainly enjoy its fascinating features.

or:

pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

vinc456

C# Export Rdlc To Pdf

vinc456

1,8194 gold badges16 silver badges29 bronze badges

Reportviewer Export Pdf Extra Page Online

protected by Jeff AtwoodJun 7 '10 at 7:21

Export Pdf Page As Image

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?