Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2005, 10:01 PM
Authorized User
 
Join Date: Jun 2005
Location: , , Philippines.
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!\"
Reply With Quote
  #2 (permalink)  
Old November 19th, 2005, 06:45 AM
Wrox Author
Points: 183, Level: 3
Points: 183, Level: 3 Points: 183, Level: 3 Points: 183, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Vancouver, Washington, USA.
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
Reply With Quote
  #3 (permalink)  
Old February 15th, 2006, 08:26 AM
Authorized User
 
Join Date: Jun 2005
Location: , , Philippines.
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!"
Reply With Quote
  #4 (permalink)  
Old March 3rd, 2006, 02:36 AM
Registered User
 
Join Date: Mar 2006
Location: Seattle, WA, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Paul you're a wrock star.

MCSD.MCDBA.MCT
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.