Printing Reports, page size and length

  • Hello all,

    I have a few reports that are basically text with some borders - from an inventory program.  We want to print them out for stock takes, but the issue I have is while viewing the report in the browser, it shows 31 pages.  If I click print, it's up to 935 pages, with many blank pages between filled pages.  If I download as a Word doc, it's down to 81 pages.

    I adjusted the column widths and margins in VS.  The actual viewable width is about 6 inches, margins are narrow.  I don't know what else I can do to get it to not print blank pages directly from the SSRS viewer.  What am I missing here?

    Thanks!

  • Not a solution, but is there a reason you need to print it from the web (ssrs)? In general, I try to avoid printing from the web and prefer printing from a tool (excel, word, adobe acrobat, etc).

    I find that printing from the web just has too many hands touching my document. You have SSRS and your web browser getting their fingers dirty with the document before it goes off to the print spooler then to the printer. So the problem COULD be with the SSRS side of things and your report has some unexpected or weird things in it (multiple text objects formatted differently, some obscure setting, upgrade bugs, etc.) or it COULD be a bug with how your browser is interpreting the data when you go to print. I know with SSRS 2016 (the version I am running... I know it is out of date, I just haven't had time to upgrade), the print button generates a PDF for you with minimal configuration options (page size and orientation) and the generated PDF (at least on my system) breaks it up by approximately 1/3 of my screen width.

    If your report is text only and in a table format, I would recommend you export to excel and print from there as printing table data is what excel is good at.

    Now, if you are trying to fix this in SSRS, I imagine you would have to make the fonts smaller, make the columns more narrow and just try to squeeze everything onto the page. Now, if I had to guess, the "blank pages" are not actually blank, just they contain no data. What I mean is that you have an object on the report that is either below or beside your regular report that is "blank". That or the right-most column is left-justified and the text in there contains a lot of spaces at the end OR the right-most column contains SOME data that extends further than the rest. So page 1 would be your data, page 2 would be blank, page 3 is blank and so on and then somewhere randomly in the list, there are some pages that you'd expect to be blank but actually contain some data. What I mean is if the column width is USUALLY 10 characters and that fits nicely on 1 page, but you have some rows with 1000 characters in that column, the column will be 1000 characters wide when you go to print. If the column is a CHAR(1000) or NCHAR(1000) column, then the column is going to be 1000 characters wide even if you don't have anything that wide in the table. IF any of the columns are of the datatype CHAR or NCHAR, you could try casting them to VARCHAR or NVARCHAR which may make it less wide.

    But what you asked is REALLY hard to debug and diagnose without having a copy of your data and report to work with and nobody is going to do that for free for you. My troubleshooting steps would be to print it to PDF from SSRS so I can determine it is 1 real page followed by 3 blank or how the blank pages (for example), then flip through to make sure that is consistent as it should be. If it is 100% consistent, then I'm likely running into a CHAR/NCHAR issue and I just need to cast it or trim it before presenting it in SSRS. If it isn't 100% consistent (ie some pages I expect to be blank actually contain data), then I need to shrink the column width and increase the row height to compensate.

    OR, the preferred approach, export to Excel and then I can see how wide the columns are coming back and I can manipulate the data until it fits on the number of pages I am expecting and then hit print. This is a much easier approach. Especially since I use SSRS exclusively as a reporting tool only. If I need to do anything with the data presented, I export to excel and then do whatever I need to do (print, group, filter, etc).

    The above is just my 2 cents...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • If you get blank pages when exporting to pdf , something is getting outside your margins.

    Take a copy of the report and work on it till it fits back in one page. Smaller fonts / columns.... Use of rectangles to group things together ...

     

  • but is there a reason you need to print it from the web (ssrs)?

    Brian,

    well I was trying to go the easy route for my users.  Select report, enter parameters, view and print!  Voila!  But it's not that simple.  I'll play with it a little more before I give up and go the Excel route.

    And speaking of Excel and reports: is it possible to send a specific report to a specific Excel file from SSRS?  I'm thinking I could setup a template, basically, that the report is saved to, that way the user does not have to mess with the formatting every time a report is saved.

  • In SSRS design mode - you have the palette.  The size of the palette matters - if it is wider than the allowed page size - then you will get additional blank pages printed.

    If your paper is standard 8.5 x 11 - then the palette width can be no larger than 8.5 - left margin - right margin.  If each margin is set to 1 inch - then the palette cannot be any larger than 6.5 (8.5 - 1 - 1).  If you set it up for landscape - standard size is 11 x 8.5 - with 1 inch margins the palette width cannot exceed 9 inches.

    You also need to validate the length.  If you have created a 'form' type of report - where each page is a record - then the palette cannot exceed the length of the paper.  Again - length for standard portrait would be 11 with 1 inch margins - so that length cannot exceed 9 inches.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • As far as I know, you can't have it export from SSRS INTO an existing Excel file. If you can, I'd be curious to know how that was done and how well it worked though.

    And I'm sorry if I am questioning process, but is printing out 30+ pages going to be easier for your end users than to export to Excel and then filter and only print the pages they need? I can't think of a use case where I would want paper copies of 30+ things except maybe for auditing purposes and even then, a digital copy would be much easier to work with, no?

    In the end, I think Jeffery's solution is what you are looking for. But I can't imagine printing so much out and having it be useful...

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • Jeff,

    What exactly determines the print size of the palette?  I'm using Visual Studio to design these reports and have extra columns in the dataset (for the parameters), but I have set them to not visible.  Attached are two screen shots, preview and designer.

    Brian,

    Well, short answer, I'm not sure.  They requested it, I tried to meet that request.  Looks like a chat is in order 🙂

     

    Attachments:
    You must be logged in to view attached files.
  • The palette is the white area where you can place controls.  You can turn on the ruler - that will show the size of the palette.  Just looking at your screenshots - it is almost certainly larger than a standard 8.5 x 11 portrait page.

    The total size of the palette is: Width of the paper minus left and right margins.  If you paper size is 8.5 and your margins are 1in - the palette cannot be more than 6.5 inches: 8.5 - 1 (left) - 1 (right) = 6.5.

     

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply