none
Export a report as JPEG format RRS feed

  • Question

  • Hi,

    From the Reporting Services 2005 Documentation, it mentions that a report can be rendered as a JPEG format.  Here is a quote from the aritcle:

    "The Image rendering extension renders a report to a bitmap or metafile. By default, the Image rendering extension produces a TIFF file of the report, which can be viewed in multiple pages. When the client receives the image, it can be displayed in an image viewer and printed.

    The Image rendering extension can generate files in any of the formats supported by GDI+: BMP, EMF, GIF, JPEG, PNG, and TIFF. For TIFF format, the file name of the primary stream is ReportName.tif. For all other formats, which render as a single page per file, the file name is ReportName_Page.ext where .ext is the file extension for the chosen format."

    But I only see TIFF to be the only available image format in the Render format drop down list. 

    Could somebody please tell me how to export a report in JPEG format?

    Thank you in advance.

     

    Tuesday, February 21, 2006 10:57 PM

Answers

  • The image format is controlled via the deviceinfo setting on the renderer.  There is no way to set this from the UI.  It can only be done programatically or by direct url access.

    However, you can specify default deviceinfo settings in the config file.  So you could add another instance of the image renderer with a default to jpg.  Add the following code to rsreportserver.config under Configuration/Extensions/Render:

        <Extension Name="JPG" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering">
            <OverrideNames>
                <Name Language="en-us">JPG</Name>
            </OverrideNames>
            <Configuration>
                <DeviceInfo>
                    <OutputFormat>JPEG</OutputFormat>
                </DeviceInfo>
            </Configuration>
        </Extension>

    Thursday, February 23, 2006 3:02 AM
    Moderator
  • The Image rendering extension exports all of the image formats including JPEG, GIF, and TIFF.  TIFF is the default.  The TIFF option in the Report Manager dropdown is calling the Image rendering extension.

    To get other image formats from the Image extension in RS 2000 you'll have to render by URL and specify the output format.  For example:

    http://localhost/reportserver/?/myreport&rs:Command=Render&rs:Format=Image&rc:OutputFormat=JPEG

    -Chris

     

    Tuesday, July 18, 2006 9:04 PM

All replies

  • The image format is controlled via the deviceinfo setting on the renderer.  There is no way to set this from the UI.  It can only be done programatically or by direct url access.

    However, you can specify default deviceinfo settings in the config file.  So you could add another instance of the image renderer with a default to jpg.  Add the following code to rsreportserver.config under Configuration/Extensions/Render:

        <Extension Name="JPG" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageReport,Microsoft.ReportingServices.ImageRendering">
            <OverrideNames>
                <Name Language="en-us">JPG</Name>
            </OverrideNames>
            <Configuration>
                <DeviceInfo>
                    <OutputFormat>JPEG</OutputFormat>
                </DeviceInfo>
            </Configuration>
        </Extension>

    Thursday, February 23, 2006 3:02 AM
    Moderator
  • Great, that works!

    Thank you very much Brian for your prompt reply.

    Cheers,

    Peter

    Thursday, February 23, 2006 5:24 PM
  • Hi,

    I tried to do the same on a Reporting Server 2000, but I do not see JPG as an option for output like it did with RS 2005.  Could somebody please let me know how to achieve the same result in RS 2000?

    Thank you in advance.

    Peter

    Monday, July 17, 2006 9:56 PM
  • Setting DeviceInfo values in the server config file like Brian described is available only in RS 2005.

    -Chris

    Tuesday, July 18, 2006 12:23 AM
  • I see there is an extension for IMAGE rendering.  But IMAGE is not shown as an option from the output format drop down list.

    Could you please tell me how to activate this?

    Thanks.

    Tuesday, July 18, 2006 4:45 PM
  • The Image rendering extension exports all of the image formats including JPEG, GIF, and TIFF.  TIFF is the default.  The TIFF option in the Report Manager dropdown is calling the Image rendering extension.

    To get other image formats from the Image extension in RS 2000 you'll have to render by URL and specify the output format.  For example:

    http://localhost/reportserver/?/myreport&rs:Command=Render&rs:Format=Image&rc:OutputFormat=JPEG

    -Chris

     

    Tuesday, July 18, 2006 9:04 PM
  • Not sure if it's different for 2008R2, but I had to use 'ImageRenderer' instead of 'ImageReport' in our 2008 R2 report server config:

    <Extension Name="IMAGE (PNG)" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering">
    <OverrideNames>
    <Name Language="en-US">Image (PNG)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <ColorDepth>24</ColorDepth>
    <OutputFormat>PNG</OutputFormat>
    </DeviceInfo>
    </Configuration>
    </Extension>

    • Proposed as answer by JoeJoeInc Wednesday, August 15, 2012 2:18 AM
    Saturday, January 1, 2011 1:28 PM
  • I found I had to re-enter the e-mail settings in reporting services configuration manager after updating the file.  

    + 1 for Danroot I used his config over brians

    (SQL 2008 R2) 

    I did modify Daroot's config to support JPEG

    <Extension Name="IMAGE (JPEG)" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering">
    <OverrideNames>
    <Name Language="en-US">Image (JPEG)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <OutputFormat>JPEG</OutputFormat>
    </DeviceInfo>
    </Configuration>
    </Extension>


    • Edited by JoeJoeInc Wednesday, August 15, 2012 2:19 AM
    Wednesday, August 15, 2012 2:18 AM
  • This works for both jpg and png but the problem is that the image file shows only about 60% of the original report as it is displayed on the web page. How do you get it to display the entire report?

    Thanks,

    Matt

    Thursday, April 10, 2014 2:51 PM