Exporting as PDF from Report Viewer control returns dramatically different file sizes

Here is an interesting tidbit I picked up today that concerns the Report Viewer controls.

Mohammad Farooq, one of our fine support folks, noticed that the same report exported as PDF from our Report Viewer control was a different size depending on the rendering mode being used by the control.

When rendering a report from the server via the control, we got a svelte 300 KB file. However, when you put the control in local mode and exported, we got a 20+ MB PDF!

This behavior is due to the fact that PDF documents are (normally) compressed when they are generated. This compression logic lives on the server-side (inside the SSRS code), but not in the Report Viewer controls. So, if you use the Report Viewer controls to render a "server report", you enjoy the benefits of "server-side" compression. If you don't, you get no compression.

Comments (7)

  1. Fatherjack says:

    Can you tell me how to best set up RS so that we make benefit of the server side compression please? I dont quite follow the distinction you are referring to…

  2. If you use SSRS "normally" you don’t have to worry about this. The only time you would run into the issue is if you display reports via the VS 2005 Report Viewer controls, and you specifically set the controls to render reports locally vs. using the default behavior which renders reports displayed in the control on the server.

    If you render reports which have been stored on the server, no problems. If you render from RDLC documents, you’ll have this behavior, and there’s nothing you can do about it except publish your reports to an SSRS server and use the server to do your rendering for you.

  3. Kevin Lowe says:

    I’ve looked this up on Google, and saw a bug report indicating this behavior is "by design".  


    That’s pretty lame – it makes the PDF export function absolutely useless.  Is there any chance that MS will reconsider and port the compression code to the ReportViewer control?

  4. I agree — it’s not a good thing. And yes, this is on the product team’s radar, but I don’t know how high on the "to do" list it is…I wouldn’t hold my breath.

  5. Christopher says:

    snapApps does have a fix for this if you have the option of using an external export button.


    You can download it from: http://www.snapapps.com/Components.aspx

  6. jbadmin says:

    I am also trying to find out where I can make this setting change. I’m very new to SQL Reporting Services. I was tasked with installing it for the first time and have this exact same issue but Im’ not understanding exactly where it is I need to go to correct this issue.

  7. PhoenixPam says:

    I have the same problem with creating Pivotgraphs in Access 2007, then trying to export in pdf format.  Its fine when viewing in Access, but when I publish the graphs for everyone to see, the orientation goes from landscape to portrait.  The skew is not pretty and makes you want to handle the data differently (I use dropdowns to track projects on different platforms with dependencies, so, I want the option of viewing ALL or just a specific platform).  Its a shame to have to re-do this because of a tech error from Microsoft! Ugh.

Skip to main content