Wrox Programmer Forums
|
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2004, 02:58 PM
Authorized User
 
Join Date: Jun 2004
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default ReportingService.Render Method

I have created a web app that uses the reporting services Web Service to pull reports from the SQL Server.

The web server is on one machine, SQL Server on another and I use the web service to get the reports. I do not use URLs in any way in order to keep as much information hidden as possible.

I have been able to list all reports, select a report, get back the parameters required, set the parameter values and render reports using ReportingService.Render

HOWEVER...

The reports that work do not include charts (graphics). When I render a report using my app, if it has no chart I can view it in HTML, PDF, TIF, Excel and MHTML. If it has a chart then for PDF, Excel and TIF all is fine. If I try to use HTML or MHTML I get a big empty space where my charts should be.

In reading the BOL under ReportingService.Render Method
I found this: "StreamIds
[out] The stream identifiers. These IDs are passed to the RenderStream method. You can use them to render the external resources (images, etc.) that are associated with a given report. "

I have found this topic:
ms-help://MS.RSBOL80.1033/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.htm
ReportingService.RenderStream Method

I read the code, and I have tried to implement it as in the BOL. I am able to write the images onto the web-server hard-drive, and the image place holder properties no longer point to my SQL server (which they did at first) but I still don't get an image.

For example, my image is actually at:
http://sandy.murdocks.on.ca/1/reports/temp/C_79_S

It is there and it works. Now my report opens in a new window since I do the final call to open it like this:
Response.AddHeader("Content-Disposition", "attachment; filename=" & fileName)
Response.BinaryWrite(data)

When I right click on the image place holder I get this:
file:///C:/Documents%20and%20Settings/Administrator/Local%20Settings/Temporary%20Internet%20Files/Content.IE5/QPIH2VE9/1/Reports/Temp/C_79_S

The images don't seem to get from being written on the drive, to being picked up for display.

My code for writing the images looks like this:

If format = "HTML4.0" Then
            For Each streamid In streamIDs
                image = rs.RenderStream(strpath, "HTML4.0", streamid, Nothing, Nothing, parameters, Nothing, Nothing)

                Dim stream As System.IO.FileStream = _
                System.IO.File.OpenWrite(Application("TempReports" ) & streamid)

                stream.Write(image, 0, CInt(image.Length))
                stream.Close()
            Next
        End If


Sandy Murdock MCP
__________________
Sandy Murdock MCP





Similar Threads
Thread Thread Starter Forum Replies Last Post
No Render Webmethod in ReportingService webservice recook2 Reporting Services 0 April 12th, 2007 03:38 PM
Render and credentials TonyStoker Reporting Services 0 May 17th, 2006 05:53 PM
CompositeDataBoundControl's Render method not work bmains ASP.NET 2.0 Professional 0 January 12th, 2006 09:22 AM
Render to Printer kirbykn BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 April 21st, 2005 03:17 PM
[ReportingService] DateTime function errors WindyZhu SQL Server 2000 2 June 17th, 2004 01:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.