all groups > sql server reporting services > may 2005 >
You're in the

sql server reporting services

group:

Problem showing images in html report when rendering report via soap in aspx page.


Problem showing images in html report when rendering report via soap in aspx page. moondaddy
5/16/2005 5:23:53 PM
sql server reporting services: I'm using an aspx page to call SSRS web services and render reports with in
that aspx page. My code is for the most part like that in the book
'Hitchhiker's Guide to Microsoft SQL Server 2000 Reporting Services' on page
595 and for the most part, things are working pretty good. My problem is
the images are not displaying in the web page.

After I call the render method, I loop through the steam IDs and format the
correct path to each resource like this:

For Each streamID In streamIDs
resource = oRS.RenderStream(ReportPath, format, streamID, historyID,
devInfo, parameters, encoding, mimeType)
Dim resourcefilepath As String =
Server.MapPath(String.Format("{0}{1}{2}", Request.ApplicationPath,
"\Reports\resources\", streamID))
Dim stream As System.IO.FileStream =
System.IO.File.OpenWrite(resourcefilepath)
stream.Write(resource, 0, CInt(resource.Length))
stream.Close()
Next

Everything pretty much works correctly. However, the image url in the web
page looks like this:

http://SomeWebSite/wsVIPN/Reports/Resources/28c664ba-ae1c-4984-88fa-9cbe048d85a8

and the image does not display. If I copy the html from ViewSource in the
web page and paste it into a static web page and post that web page to the
web server, then change the name of the resource so it has a jpg extension
on it like this:
28c664ba-ae1c-4984-88fa-9cbe048d85a8.jpg, and then edit the image url in the
web page accordingly, then the image shows just fine. Evidently, ie doesn't
like to show image with out a proper image file extension.

How can I resolve this problem? I could do a hack fix like automatically
write the resource to disc (on the server) and use a jpg file extension, and
then make the path to the resource in the stream the same. But what if the
resource is a gif, or css, or something else? There must be a better way.

I've found very little documentation about this (actually, none.)

Please advise.

Thanks.








--
moondaddy@nospam.nospam

RE: Problem showing images in html report when rendering report via soap in aspx page. v-mingqc NO[at]SPAM online.microsoft.com
5/17/2005 12:00:00 AM
Hi Moondaddy,

Thanks for your posting!

Have you applied Reporting Services SP2?

How to obtain the latest service pack for SQL Server 2000 Reporting Services
http://support.microsoft.com/kb/842440

I found SP2 has fixed many render method issue as described below

A list of the bugs that are fixed by SQL Server 2000 Reporting Services
Service Pack 2
http://support.microsoft.com/kb/889640/


Sincerely yours,

Michael Cheng
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: Problem showing images in html report when rendering report via soap in aspx page. moondaddy
5/26/2005 10:57:53 PM
No not yet. I havent had a chance to review all the issues and do whats
needed to protect things before appling the update. I hope to soon though.
Thanks.

--
moondaddy@nospam.nospam
[quoted text, click to view]

AddThis Social Bookmark Button