Sql Reporting Service 2005 Exporting to PDF Image Issues RRS feed

  • Question


    I have been having a problem with Sql Reports Sever 2005.  I have a SBS 2003  R2 Server that runs the SRS. I have created a Asp.Net 2.0 application to produce PDF reports on the fly.  The  data is pulled from a Sql 2005 database on the same machine.  Most of the reports render ok, but there are a few that are having some issues. 


    I have 2 reports that are acting odd and both are over 100 pages.  All my reports use the same rdl template and all the data is just text address info and 1 external image located on the same server that is referenced like file://c:\myfolder\myfile.jpg from a database field. The issue I am running into seems to be a problem with the PDF renderer.  For instance:  I have one report that is 146 pages, one record of the database spans 2 pages so 73 records of data are used to produce this 146 page report.  Most of the time the report image reference will be the same for each record and on this particular report it is.  The image reference is the same for each of the 73 records.  For some reason after the report reaches somewhere around say 110 pages it shows a red X instead of the image.  But, sometimes it will start showing the image again maybe 2 or 3 records later.  It is very odd.  I have also run this report from the Visual Studios 2005 report designer on the 2003 server itself and it shows all the images correctly when I preview it, but, when I export it to PDF and save the file, it is still missing some of the images.  Now again, the images are all the same and are external coming from the machine I am running the reports on.    I have also exported to Excel and the images render correctly here, but not on the PDF export.  I am very confident that it is an issue with the PDF renderer and I am hoping someone can help.

    Tuesday, December 23, 2008 11:06 PM

All replies

  • Do you mean the image renders upto 110 th page and after it its not appearing in the PDF?

    Friday, December 26, 2008 8:52 AM
  • Yes. Kind of.  One of the reports will render 110 pages with the image then the last 2 or 3 will be missing the image and the red x will show.  Another report will render say 100 or so then the image will not render for about 3 or 4 pages then show back up again.  Its the same external image for each page.  It is really odd.  It will show just fine before exported to PDF.
    Sunday, December 28, 2008 8:40 PM
  •  There was a similar posting out there from Sam Sam, but I didnt see any resolution.
    Sunday, December 28, 2008 8:42 PM
  • I almost think it has something to do with session memory, but that would really put a drag on SSRS if that were the case.  I am almost thinking about doing a batch type report resolution to keep my pages to 30 or so.  This would probably fix the issue, but is a very poor option. The users would need to download a report 30 pages at a time.  Kind of annoying i would think.
    Sunday, December 28, 2008 8:52 PM
  • I don't understand why you will use two pages for one because export to PDF works better if your page setting it bigger than 8/11. I am also hoping you know image in the header comes with different requirements if your reports image is in the header of page one.

    And 146 pages is a very small report because I have written some that default to almost 200 pages in test server.

    Here is code to Exporting a SQL Server Reporting Services 2005 Report Directly to PDF or Excel 


    Win2003 is IIS6 which comes locked down to render only Html so here are the default folder permissions.


    Friday, January 2, 2009 9:27 PM
  • Each record has a front and back page, so when you print the PDF you can set it up to print front and back every other page.  So for each record, page 1 is front and page 2 is back.  So 73 records yields 73 printed front and back pages or 146 front pages.  Very convenient.  So, my report page size is set to 7.25 X 9.75, my Body size is 7.25 X 19.5 and my List size is 7.25 X 19.5.  It works great on smaller reports, even if the image is changed midway through the report.  Its just the larger size reports. 
    Friday, January 2, 2009 10:23 PM
  • I already have the code all set up for exporting directly to PDF.   Asp.Net c# code that renders the same results as just exporting from the VS 2005 Designer. 

    My PDF needs to be set up this way because each database record renders a front and back page.  So, a 73 record query would result in a 73 page report printed front and back or a 146 page report just front.  Its very convenient for my applications needs.  So, myreport is set up like this:  Report page size is 7.25 X 9.75, List size is 7.25 X 19.5 and Body size is 7.25 X 19.5.  I have done allot of manipulating with this and I really believe it to be a PDF render problem.
    Friday, January 2, 2009 10:29 PM
  • I have problem with your half and quarter point settings because you can manually adjust your page settings until the export to PDF works because you currently have rendering issues.  So you need to manually change settings and adjust as needed.  Yes PDF export comes with issues but you have something that reads like a book so using such settings of  page size is set to 7.25 X 9.75,  size is 7.25 X 19.5 and List size is 7.25 X 19.5 is not practical. 

    Friday, January 2, 2009 10:41 PM
  • Here are two third party tools but it is not free because I think the smallest page setting I know is 8.5/11 so you need to test drive the third party solutions and try installing full PDF tool from Adobe.




    Friday, January 2, 2009 11:08 PM
  • To be honest with you Caddre, you have kind of lost me.  The practicality of my solution is relative to my needs.  If your telling me that the PDF export renderer is not worthy, then i understand.  Just another item on my list of products from Microsoft that are poor.  Anyway,  I cant see spending $3000 on a third party tool.  That cant be the only solution, that would be crazy.  I guess I will dig into this some more and see what I can resolve.  Thanks though.
    Sunday, January 4, 2009 4:04 AM

    Now I am the one that is lost because you did not pay for Reporting Services it comes free with the Relational Engine as you can see there is one available with Express edition. Try moving the Reports Server DB from one server to the other if the relational engine of the new server does not know your transferred Reports Server DB your reports will not work.  So it is a free UI for your relational engine.

    Your solution is not practical because it is less than standard page in dimensions in a stateless platform Asp.net that comes without what makes a page.

    I would not say the PDF renderer  is not good because it works in most practical uses and PDF is Adobe's product not Microsoft, you said export to Excel which is Microsoft's product works.  I have told you to adjust dimensions and export that is what you do with reporting services try test exports and test prints.

    I gave you the third party product because you want your report which is a book to work as is so you need to pay for what will give you that because again the reporting services is free. 

    (Just another item on my list of products from Microsoft that are poor.)

    I think the above statement is just extreme, you have the option to use Crystal report either the free one in Visual Studio or pay for the free standing version which comes with very strict license.

    Sunday, January 4, 2009 3:46 PM
  • Small Business Server was not free.  I wish it was.  Its not a book.  Its a very very simple report.  2 page report repeating per record.  I will resolve it.  Thanks again.
    Tuesday, January 6, 2009 2:36 AM
  • Actually in Small business server 2003 I run one so I know you pay for Windows and get Exchange and SQL Server the reason Microsoft restricts it to one per network.  So you are actually not paying for the relational engine because you are just paying for Windows.

    I am not minimizing your problem but I don't see how your current dimesions can be exported to PDF without custom solution.

    Tuesday, January 6, 2009 2:49 AM
  • It sounds like you may be running into a timeout with the external images.  If you can run this in a ReportServer, you can alter the timeout.  See http://www.kodyaz.com/articles/enable-remote-errors.aspx to see how to edit the configuration that is in the database.  (ReportServer database, ConfigurationInfo table, Name = 'ExternalImagesTimeout').  By default this is 600 seconds, aka 10 minutes.  It sounds like this may not be large enough.  Try increasing the timeout to how long the report takes to render and it may solve your problem.

    Hope this helps and Good Luck!

    Tuesday, January 6, 2009 5:10 PM
  •  I have had a nearly identical problem.  I have a report with an image.  When the report gets very large (several hundred pages), the image disappears and is replaced by the red X after the first hundred pages.  The main difference between my situation and Karlo123 is that my image is embedded, not external.  The image is 120 KB, but it covers the entire page on the report and acts as a background.

    I'm pretty confident that my problem is not a timeout problem since the report generates in about 3 seconds.  The fact that I'm not referencing external images also indicates that that's not the problem.

    I'm really not sure what to try next.  Any suggestions would be welcomed.

    Friday, January 23, 2009 12:05 AM