Displaying SSRS 2005 via Web Services in ASP.NET
-
Hi. I've created a SSRS chart report that I'd like to display in my .net web application via web services. I've found a few examples that work with SSRS 2000 but not 05. I've managed to get the report to write to a pdf file but I'm unable display it directly in a browser. My code is below, any help will be greatly appreciated. Also if anyone knows where I can review some SSRS 2005 examples of displaying reports on a web page, that would be great! Thanks! Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim rs As RSwebReference.ReportingService2005 = New RSwebReference.ReportingService2005() Dim rsExec As RSwebReference.ReportExecutionService = New RSwebReference.ReportExecutionService() 'Authenticate to the Web service using Windows credentials rs.Credentials = System.Net.CredentialCache.DefaultCredentials rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials 'Assign the URL of the Web service rs.Url = "http://localhost/REPORTSERVER$SQL2005/ReportService2005.asmx" rsExec.Url = "http://localhost/REPORTSERVER$SQL2005/ReportExecution2005.asmx" Dim results As Byte() = Nothing Dim historyID As String = Nothing Dim format As String = "pdf" Dim encoding As String Dim mimeType As String Dim extension As String Dim warnings() As RSwebReference.Warning Dim streamIDs() As String = Nothing Dim fileName As String = "C:\samplereport.pdf" Dim deviceInfo As String = Nothing 'Dim deviceInfo As String = _ ' "" + _ ' "False" + _ ' "False" + _ ' "True" + _ ' "100" + _ ' "" 'Define variables needed for GetParameters() method Dim _reportName As String = "/Test/AuditVendorStatus" Dim _historyID As String = Nothing Dim _forRendering As Boolean = False Dim _values As RSwebReference.ParameterValue() = Nothing Dim _credentials As RSwebReference.DataSourceCredentials() = Nothing Dim _parameters As RSwebReference.ReportParameter() = Nothing Try 'Get if any parameters needed. '_parameters = rs.GetReportParameters(_reportName, _historyID, _forRendering, _values, _credentials) 'Load the selected report. Dim ei A