Click here to Skip to main content
Licence 
First Posted 26 May 2005
Views 28,363
Bookmarked 15 times

Displaying the Images returned by RenderStream Method of Sql Server Reporting Services.(By Malik Asif Joyia.)

By | 26 May 2005 | Article
Displaying the Images returned by RenderStream Method of Sql Server Reporting Services.(By Malik Asif Joyia.)

Introduction

I am Malik Asif Joyia. Working as software engineer in Palmchip corporation Pakistan.

this Article will help to you solve a problem which you face when you render your report in a web page in html format. you will not face this problem for the other types like PDF, EXCEL etc. because that include images or charts in their stream.

Details

I am working on a project that is a web based application that uses render and RenderStream Methods of Sql server reporting services.

 

When you use the Render() method of Sql server reporting service that return u the stream of the report. If you have images in your report and you are getting the stream of type HTML. Then returned stream will not contain the images in it. It will contain streamId’s for all the object like charts, images etc.

 

Then after calling the render method you need to call the RenderStream() method to get all the objects.

 

As I got started on it, I had some problems getting the rendered images to appear in the report. It turns out that these resources are output without any file extension, so IE wasn't sure how to handle them.

 

The fix this problem you have to configure your Web Server.

 

 

 

 

  • In Internet Information Services Manager, navigate to the directory where external resources are rendered (the ASP.NET Machine account <machinename>\ASPNET will need to have write permissions to this directory in order to successfully create resources)

 

  • Open the Properties page for of your web application , and select the HTTP Headers tab

 Sample screenshot

  • Click 'MIME Types'

       Sample screenshot

 

  • Click 'New Type'

 Sample screenshot

  • In 'Associated Extension', enter '*' (no quotes)

 

  • In 'Content Type (MIME)', enter 'image/png' (no quotes)

 

I am working on a project that is a web based application that uses render and RenderStream Methods of Sql server reporting services.

 

When you use the Render() method of Sql server reporting service that return u the stream of the report. If you have images in your report and you are getting the stream of type HTML. Then returned stream will not contain the images in it. It will contain streamId’s for all the object like charts, images etc.

 

Then after calling the render method you need to call the RenderStream() method to get all the objects.

 

As I got started on it, I had some problems getting the rendered images to appear in the report. It turns out that these resources are output without any file extension, so IE wasn't sure how to handle them.

 

The fix this problem you have to configure your Web Server.

 

 

 

 

  • In Internet Information Services Manager, navigate to the directory where external resources are rendered (the ASP.NET Machine account <machinename>\ASPNET will need to have write permissions to this directory in order to successfully create resources)

 

  • Open the Properties page for of your web application , and select the HTTP Headers tab

 

  • Click 'MIME Types'

 

 

  • Click 'New Type'

 

  • In 'Associated Extension', enter '*' (no quotes)

 

  • In 'Content Type (MIME)', enter 'image/png' (no quotes)

 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Asif joyia

Web Developer

Pakistan Pakistan

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralRequire sample code to render report with data and Graph using Render and RenderStream service method Pinmemberketki139827:44 19 Aug '09  
QuestionImages are not displayed in deployed Reports Pinmemberrpires4:10 25 Oct '05  
GeneralRenderStream Problems PinmemberNick Lucas4:39 17 Aug '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 27 May 2005
Article Copyright 2005 by Asif joyia
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid