PDA

View Full Version : Need Help Using Reporting Services


wengert
10-29-2005, 10:56 AM
I am attempting to create a web page to veiw a report I created and deployed using RS. I am confused (not unusual) on exactly what I need to do to display the report via a web page. My development environment is VS 2003/VB. I found the code below via a KB but I have the following questions:

1. Exactly what does "create the web service proxy class" mean? What do I actually do?
2. When I create a new web form and add the sample code, "ReportingServices" is flagged as undefined. Is there an Import I need to add?

Any pointers to examples or information would be appreciated. I'd love to see the code in a webform that displays a report.


=======================================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


' You must create the web service proxy class to point to
' https://rs.discountasp.net/ReportServer/reportservice.asmx
' before using this code


Dim rs As New ReportingService()


rs.Credentials = New System.Net.NetworkCredential("<report_username>", "<report_password>", "")


Dim results As Byte(), image As Byte()
Dim streamids As String(), streamid As String


' Render the report to HTML4.0


results = rs.Render("/<path_to_report>", "HTML4.0", _
Nothing, "<DeviceInfo><StreamRoot>/WebApplication1/</StreamRoot></DeviceInfo>", Nothing, _
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, streamids)


Response.BinaryWrite(results)


End Sub
================================================

------------
Wayne

wengert
10-31-2005, 01:58 AM
I finally found an article that explained the way to setup a proxy in VS 2003and that cleared up most of the problems

------------
Wayne