Wrox Programmer Forums
|
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services 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 November 15th, 2005, 10:01 PM
Authorized User
 
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default Drill down issues

I have a report with a drill down(User List with drill down on User Roles). I render a report programmatically using ReportingService.Render method with HTML4.0 format.

Problem is everytime a user view a report on the ASP.NET UI,it prompts the user credentials screen and the status bar says its downloading an Image. After analysis, I found that the image being downloaded for rendering was the TogglePlus and ToggleMinus icon for drilldown.

How can I display it without the annoying user credentials screen,because we don't want to give end users the credentials being use in the reporting server.





Aldwin Enriquez
"Dont you ever give up!"
__________________
\"Dont you ever give up!\"
 
Old November 19th, 2005, 06:45 AM
Wrox Author
 
Join Date: May 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Drill-down is difficult to implement with programmatic rendering. Aside from the image streaming issue, the drill-down links will produce Get requests. I'm afraid I don't have an easy answer but it's best to use URL rendering for reports with graphics, drill-down and drill-through features. You can also use the ReportViewer control in RS2005 and SharePoint in RS2000. If you need to use programmatic rendering, use the webarchive or PDF formats. For HTML rendering, any images (including the plus sign icons) must be managed as separate Stream objects in your code. You can write these out to files in your local file system so they'll be picked-up by IE when the report is viewed. Although there may be easier ways to solve this problem, the following ASP.NET web form code manages both rendering and writing the images to files in a folder called report_images under the current web folder:

        Dim rs As New ReportServer_ReportService.ReportingService
        Dim cred As New System.Net.NetworkCredential(sReportUserID, sReportPassword)
        Dim creds As New System.Net.CredentialCache
        creds.Add(New Uri(rpt.SavedReportWebServiceURI), "NTLM", cred)
        rs.Credentials = cred

        Dim sDevInfo As String = "<DeviceInfo><StreamRoot>/report_images/</StreamRoot></DeviceInfo>"

        Dim sStreamIDs() As String
        Dim sStreamID As String

        Dim ReportBytes As Byte()
        Dim ImageBytes As Byte()
        ReportBytes = rs.Render(Session.Item("ReportName"), _
                            Session.Item("RenderFormat"), _
                            Nothing, sDevInfo, _
                            Session.Item("ParamValues"), _
                            Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, sStreamIDs)

        For Each sStreamID In sStreamIDs
            ImageBytes = rs.RenderStream(Session.Item("ReportName"), Session.Item("RenderFormat"), sStreamID, Nothing, Nothing, Session.Item("ParamValues"), Nothing, Nothing)
            Dim stream As System.IO.FileStream = System.IO.File.OpenWrite(Server.MapPath("/report_images/") & sStreamID)

            stream.Write(ImageBytes, 0, CInt(ImageBytes.Length))
            stream.Close()
        Next

        With HttpContext.Current.Response
            .Clear()
            .BinaryWrite(ReportBytes)
            .End()
        End With

Paul Turley, MCSD, MCDBA, MCT, MSF Practitioner
 
Old February 15th, 2006, 08:26 AM
Authorized User
 
Join Date: Jun 2005
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default

Thanks a lot Paul

Aldwin Enriquez
"Dont you ever give up!"
 
Old March 3rd, 2006, 02:36 AM
Registered User
 
Join Date: Mar 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Paul you're a wrock star.

MCSD.MCDBA.MCT





Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
Where does the drill down goes? dash dev Crystal Reports 0 March 15th, 2008 12:50 AM
Drill-Through baaul BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 September 23rd, 2007 08:08 PM
Drill down hosefo81 PHP How-To 2 November 28th, 2003 09:46 PM
how to drill down hosefo81 PHP How-To 0 November 21st, 2003 01:14 AM





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