all groups > sql server reporting services > august 2004 >
I made a ASP.NEt application that runs on my local machine to display reports as PDF's. When I moved the code to a project that is in Source Safe, and points to remote servers, it Times out. I'm concerned, how does the Render method in the Source Safe project know what Report Server to look at? The syntax does not specify. It only give the project name and report name (project/reportname) Here is the code I made for my local machine: 'Render using the SOAP API Call Dim strFilePathway As String = "C:\Documents and Settings\rwiethor\Desktop\SOAP_Render.pdf" Dim rs As New ReportingWebRef.ReportingService rs.Credentials = System.Net.CredentialCache.DefaultCredentials 'Setup Arguments Dim Result As Byte() = Nothing Dim strReportName As String = "/PRC_Test2/PRC1" Dim strFormat As String = "PDF" Dim HistoryID As String = Nothing Dim DevInfo As String = Nothing ''Setup Parameters Dim Parameters(0) As ReportingWebRef.ParameterValue Parameters(0) = New ReportingWebRef.ParameterValue Parameters(0).Name = "ParcelID" Parameters(0).Value = cboParcelID.SelectedValue.ToString Dim Credentials As ReportingWebRef.DataSourceCredentials() = Nothing Dim ShowHideToggle As String = Nothing Dim Encoding As String 'Output variable Dim MimeType As String 'Output variable Dim Warnings As ReportingWebRef.Warning() = Nothing Dim ReportHistoryParameters As ReportingWebRef.ParameterValue() = Nothing Dim StreamIDs As String() = Nothing Dim SH As New ReportingWebRef.SessionHeader rs.SessionHeaderValue = SH Try Result = rs.Render(strReportName, strFormat, HistoryID, DevInfo, Parameters, Credentials, ShowHideToggle, Encoding, MimeType, ReportHistoryParameters, Warnings, StreamIDs) SH.SessionId = rs.SessionHeaderValue.SessionId Catch SOAPe As SoapException Console.WriteLine(SOAPe.Message) Response.Write("<SOAP ERROR<BR>" & SOAPe.Detail.OuterXml) Console.Write(SOAPe.Detail.OuterXml) Catch ex As Exception Console.WriteLine(ex.Message) End Try 'Write the contents of the report to a file Try Dim Stream As FileStream = File.Create(strFilePathway, result.Length) Stream.Write(Result, 0, Result.Length) Stream.Close() Catch ex As Exception Response.Write("& ex.Message) End Try rs.Dispose() 'USe the Utils Class to open a new window and pass the URL, and 'display the PDF in the page Dim strPageName As String = "DisplayPDF.aspx" Dim strURL As String strURL = "file:///C:/Documents%20and% 20Settings/rwiethor/Desktop/SOAP_Render.pdf" Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, "DiplayPDf", True) 'Tell me when its done Response.Write("Done") This code will generate a byte array, write it to a file (PDF), and call a new window, open it up and display the file in IE. However, when I copied the above code to a page in the project in source safe, the Session times out at the Render method. I have viewed reports in the project using the ReportViewer control, so I know the ReportServer is up and running. I also can see them using the Report Manager. I'm concerned, how does the Render method in the Source Safe project know what Report Server to look at? The syntax does not specify. It only give the project name and report name (project/reportname). Versus the Report viewer control actually builds a string containing the path to the reportserver, and the report. Can anyone shed some light on this so I can understand better? thanks, rwiethorn
It uses the Url property on the proxy object. I think the default is http://localhost/Reportser. Set it explicitly before making the call. -- Tudor Trufinescu Dev Lead Sql Server Reporting Services This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message news:553a0349.0408131324.2066b3c8@posting.google.com... > I made a ASP.NEt application that runs on my local machine to display > reports as PDF's. When I moved the code to a project that is in Source > Safe, and points to remote servers, it Times out. I'm concerned, how > does the Render method in the Source Safe project know what Report > Server to look at? The syntax does not specify. It only give the > project name and report name (project/reportname) > > Here is the code I made for my local machine: > > 'Render using the SOAP API Call > > Dim strFilePathway As String = "C:\Documents and > > Settings\rwiethor\Desktop\SOAP_Render.pdf" > Dim rs As New ReportingWebRef.ReportingService > > rs.Credentials = System.Net.CredentialCache.DefaultCredentials > > > 'Setup Arguments > Dim Result As Byte() = Nothing > Dim strReportName As String = "/PRC_Test2/PRC1" > Dim strFormat As String = "PDF" > Dim HistoryID As String = Nothing > Dim DevInfo As String = Nothing > > ''Setup Parameters > Dim Parameters(0) As ReportingWebRef.ParameterValue > Parameters(0) = New ReportingWebRef.ParameterValue > Parameters(0).Name = "ParcelID" > Parameters(0).Value = cboParcelID.SelectedValue.ToString > > Dim Credentials As ReportingWebRef.DataSourceCredentials() = > Nothing > Dim ShowHideToggle As String = Nothing > Dim Encoding As String 'Output variable > Dim MimeType As String 'Output variable > Dim Warnings As ReportingWebRef.Warning() = Nothing > Dim ReportHistoryParameters As > ReportingWebRef.ParameterValue() = > > Nothing > Dim StreamIDs As String() = Nothing > Dim SH As New ReportingWebRef.SessionHeader > rs.SessionHeaderValue = SH > > Try > Result = rs.Render(strReportName, strFormat, HistoryID, > DevInfo, > Parameters, Credentials, ShowHideToggle, > Encoding, > MimeType, ReportHistoryParameters, Warnings, > StreamIDs) > SH.SessionId = rs.SessionHeaderValue.SessionId > > > Catch SOAPe As SoapException > Console.WriteLine(SOAPe.Message) > Response.Write("<SOAP ERROR<BR>" & SOAPe.Detail.OuterXml) > Console.Write(SOAPe.Detail.OuterXml) > Catch ex As Exception > Console.WriteLine(ex.Message) > End Try > > 'Write the contents of the report to a file > Try > Dim Stream As FileStream = File.Create(strFilePathway, > > result.Length) > Stream.Write(Result, 0, Result.Length) > Stream.Close() > Catch ex As Exception > Response.Write("& ex.Message) > End Try > rs.Dispose() > > > 'USe the Utils Class to open a new window and pass the URL, > and > 'display the PDF in the page > Dim strPageName As String = "DisplayPDF.aspx" > Dim strURL As String > strURL = "file:///C:/Documents%20and% > > 20Settings/rwiethor/Desktop/SOAP_Render.pdf" > Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, > "DiplayPDf", > > True) > > 'Tell me when its done > Response.Write("Done") > > This code will generate a byte array, write it to a file (PDF), and > call a new window, open it up and display the file in IE. > > However, when I copied the above code to a page in the project in > source safe, the Session times out at the Render method. > > I have viewed reports in the project using the ReportViewer control, > so I know the ReportServer is up and running. I also can see them > using the Report Manager. > > > I'm concerned, how does the Render method in the Source Safe project > know what Report Server to look at? The syntax does not specify. It > only give the project name and report name (project/reportname). > Versus the Report viewer control actually builds a string containing > the path to the reportserver, and the report. > > Can anyone shed some light on this so I can understand better? > > thanks, > rwiethorn > > rwiehtorn_bad-Spam@belcan.com
Tudor, Thanks for the reply. Sorry for being ignorant, But what is the proxy object? Is it in the VB.net application? or is it in the web reference? Again, thanks for the help, rwiethorn rwiehtorn_bad-Spam@belcan.com [quoted text, click to view] "Tudor Trufinescu \(MSFT\)" <tudortr@ms.com> wrote in message news:<OZfOpbYgEHA.3016@tk2msftngp13.phx.gbl>... > It uses the Url property on the proxy object. I think the default is > http://localhost/Reportser. Set it explicitly before making the call. > > -- > Tudor Trufinescu > Dev Lead > Sql Server Reporting Services > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message > news:553a0349.0408131324.2066b3c8@posting.google.com... > > I made a ASP.NEt application that runs on my local machine to display > > reports as PDF's. When I moved the code to a project that is in Source > > Safe, and points to remote servers, it Times out. I'm concerned, how > > does the Render method in the Source Safe project know what Report > > Server to look at? The syntax does not specify. It only give the > > project name and report name (project/reportname) > > > > Here is the code I made for my local machine: > > > > 'Render using the SOAP API Call > > > > Dim strFilePathway As String = "C:\Documents and > > > > Settings\rwiethor\Desktop\SOAP_Render.pdf" > > Dim rs As New ReportingWebRef.ReportingService > > > > rs.Credentials = System.Net.CredentialCache.DefaultCredentials > > > > > > 'Setup Arguments > > Dim Result As Byte() = Nothing > > Dim strReportName As String = "/PRC_Test2/PRC1" > > Dim strFormat As String = "PDF" > > Dim HistoryID As String = Nothing > > Dim DevInfo As String = Nothing > > > > ''Setup Parameters > > Dim Parameters(0) As ReportingWebRef.ParameterValue > > Parameters(0) = New ReportingWebRef.ParameterValue > > Parameters(0).Name = "ParcelID" > > Parameters(0).Value = cboParcelID.SelectedValue.ToString > > > > Dim Credentials As ReportingWebRef.DataSourceCredentials() = > > Nothing > > Dim ShowHideToggle As String = Nothing > > Dim Encoding As String 'Output variable > > Dim MimeType As String 'Output variable > > Dim Warnings As ReportingWebRef.Warning() = Nothing > > Dim ReportHistoryParameters As > > ReportingWebRef.ParameterValue() = > > > > Nothing > > Dim StreamIDs As String() = Nothing > > Dim SH As New ReportingWebRef.SessionHeader > > rs.SessionHeaderValue = SH > > > > Try > > Result = rs.Render(strReportName, strFormat, HistoryID, > > DevInfo, > > Parameters, Credentials, ShowHideToggle, > > Encoding, > > MimeType, ReportHistoryParameters, Warnings, > > StreamIDs) > > SH.SessionId = rs.SessionHeaderValue.SessionId > > > > > > Catch SOAPe As SoapException > > Console.WriteLine(SOAPe.Message) > > Response.Write("<SOAP ERROR<BR>" & SOAPe.Detail.OuterXml) > > Console.Write(SOAPe.Detail.OuterXml) > > Catch ex As Exception > > Console.WriteLine(ex.Message) > > End Try > > > > 'Write the contents of the report to a file > > Try > > Dim Stream As FileStream = File.Create(strFilePathway, > > > > result.Length) > > Stream.Write(Result, 0, Result.Length) > > Stream.Close() > > Catch ex As Exception > > Response.Write("& ex.Message) > > End Try > > rs.Dispose() > > > > > > 'USe the Utils Class to open a new window and pass the URL, > > and > > 'display the PDF in the page > > Dim strPageName As String = "DisplayPDF.aspx" > > Dim strURL As String > > strURL = "file:///C:/Documents%20and% > > > > 20Settings/rwiethor/Desktop/SOAP_Render.pdf" > > Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, > > "DiplayPDf", > > > > True) > > > > 'Tell me when its done > > Response.Write("Done") > > > > This code will generate a byte array, write it to a file (PDF), and > > call a new window, open it up and display the file in IE. > > > > However, when I copied the above code to a page in the project in > > source safe, the Session times out at the Render method. > > > > I have viewed reports in the project using the ReportViewer control, > > so I know the ReportServer is up and running. I also can see them > > using the Report Manager. > > > > > > I'm concerned, how does the Render method in the Source Safe project > > know what Report Server to look at? The syntax does not specify. It > > only give the project name and report name (project/reportname). > > Versus the Report viewer control actually builds a string containing > > the path to the reportserver, and the report. > > > > Can anyone shed some light on this so I can understand better? > > > > thanks, > > rwiethorn > >
The proxy object is a class that VB generates when you add a web reference. By default, it will have the name of the server you are connecting to. -- Brian Welcker Group Program Manager SQL Server Reporting Services This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message news:553a0349.0408150352.5d22ed86@posting.google.com... > Tudor, > Thanks for the reply. > > Sorry for being ignorant, But what is the proxy object? Is it in the > VB.net application? or is it in the web reference? > > Again, thanks for the help, > rwiethorn > rwiehtorn_bad-Spam@belcan.com > > > > > "Tudor Trufinescu \(MSFT\)" <tudortr@ms.com> wrote in message > news:<OZfOpbYgEHA.3016@tk2msftngp13.phx.gbl>... >> It uses the Url property on the proxy object. I think the default is >> http://localhost/Reportser. Set it explicitly before making the call. >> >> -- >> Tudor Trufinescu >> Dev Lead >> Sql Server Reporting Services >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message >> news:553a0349.0408131324.2066b3c8@posting.google.com... >> > I made a ASP.NEt application that runs on my local machine to display >> > reports as PDF's. When I moved the code to a project that is in Source >> > Safe, and points to remote servers, it Times out. I'm concerned, how >> > does the Render method in the Source Safe project know what Report >> > Server to look at? The syntax does not specify. It only give the >> > project name and report name (project/reportname) >> > >> > Here is the code I made for my local machine: >> > >> > 'Render using the SOAP API Call >> > >> > Dim strFilePathway As String = "C:\Documents and >> > >> > Settings\rwiethor\Desktop\SOAP_Render.pdf" >> > Dim rs As New ReportingWebRef.ReportingService >> > >> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials >> > >> > >> > 'Setup Arguments >> > Dim Result As Byte() = Nothing >> > Dim strReportName As String = "/PRC_Test2/PRC1" >> > Dim strFormat As String = "PDF" >> > Dim HistoryID As String = Nothing >> > Dim DevInfo As String = Nothing >> > >> > ''Setup Parameters >> > Dim Parameters(0) As ReportingWebRef.ParameterValue >> > Parameters(0) = New ReportingWebRef.ParameterValue >> > Parameters(0).Name = "ParcelID" >> > Parameters(0).Value = cboParcelID.SelectedValue.ToString >> > >> > Dim Credentials As ReportingWebRef.DataSourceCredentials() = >> > Nothing >> > Dim ShowHideToggle As String = Nothing >> > Dim Encoding As String 'Output variable >> > Dim MimeType As String 'Output variable >> > Dim Warnings As ReportingWebRef.Warning() = Nothing >> > Dim ReportHistoryParameters As >> > ReportingWebRef.ParameterValue() = >> > >> > Nothing >> > Dim StreamIDs As String() = Nothing >> > Dim SH As New ReportingWebRef.SessionHeader >> > rs.SessionHeaderValue = SH >> > >> > Try >> > Result = rs.Render(strReportName, strFormat, HistoryID, >> > DevInfo, >> > Parameters, Credentials, ShowHideToggle, >> > Encoding, >> > MimeType, ReportHistoryParameters, Warnings, >> > StreamIDs) >> > SH.SessionId = rs.SessionHeaderValue.SessionId >> > >> > >> > Catch SOAPe As SoapException >> > Console.WriteLine(SOAPe.Message) >> > Response.Write("<SOAP ERROR<BR>" & SOAPe.Detail.OuterXml) >> > Console.Write(SOAPe.Detail.OuterXml) >> > Catch ex As Exception >> > Console.WriteLine(ex.Message) >> > End Try >> > >> > 'Write the contents of the report to a file >> > Try >> > Dim Stream As FileStream = File.Create(strFilePathway, >> > >> > result.Length) >> > Stream.Write(Result, 0, Result.Length) >> > Stream.Close() >> > Catch ex As Exception >> > Response.Write("& ex.Message) >> > End Try >> > rs.Dispose() >> > >> > >> > 'USe the Utils Class to open a new window and pass the URL, >> > and >> > 'display the PDF in the page >> > Dim strPageName As String = "DisplayPDF.aspx" >> > Dim strURL As String >> > strURL = "file:///C:/Documents%20and% >> > >> > 20Settings/rwiethor/Desktop/SOAP_Render.pdf" >> > Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, >> > "DiplayPDf", >> > >> > True) >> > >> > 'Tell me when its done >> > Response.Write("Done") >> > >> > This code will generate a byte array, write it to a file (PDF), and >> > call a new window, open it up and display the file in IE. >> > >> > However, when I copied the above code to a page in the project in >> > source safe, the Session times out at the Render method. >> > >> > I have viewed reports in the project using the ReportViewer control, >> > so I know the ReportServer is up and running. I also can see them >> > using the Report Manager. >> > >> > >> > I'm concerned, how does the Render method in the Source Safe project >> > know what Report Server to look at? The syntax does not specify. It >> > only give the project name and report name (project/reportname). >> > Versus the Report viewer control actually builds a string containing >> > the path to the reportserver, and the report. >> > >> > Can anyone shed some light on this so I can understand better? >> > >> > thanks, >> > rwiethorn >> > >> > rwiehtorn_bad-Spam@belcan.com
Brian, Thanks for the reply. Again, I'm ignorant and trying to learn. Can I change the value in the Proxy Object? In the VB project I click on the Properties tab, and I can see an Entry for Web Refernce URL. The value is: "http://localhost/reportserver/reportservice.asmx?wsdl" Is this the Proxy Object? and if so, changing it here might help my problem? Thanks again, rwiethorn rwietjhorn-Bad_spam@belcan.com [quoted text, click to view] "Brian Welcker [MSFT]" wrote: > The proxy object is a class that VB generates when you add a web reference. > By default, it will have the name of the server you are connecting to. > > -- > Brian Welcker > Group Program Manager > SQL Server Reporting Services > > This posting is provided "AS IS" with no warranties, and confers no rights. > > "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message > news:553a0349.0408150352.5d22ed86@posting.google.com... > > Tudor, > > Thanks for the reply. > > > > Sorry for being ignorant, But what is the proxy object? Is it in the > > VB.net application? or is it in the web reference? > > > > Again, thanks for the help, > > rwiethorn > > rwiehtorn_bad-Spam@belcan.com > > > > > > > > > > "Tudor Trufinescu \(MSFT\)" <tudortr@ms.com> wrote in message > > news:<OZfOpbYgEHA.3016@tk2msftngp13.phx.gbl>... > >> It uses the Url property on the proxy object. I think the default is > >> http://localhost/Reportser. Set it explicitly before making the call. > >> > >> -- > >> Tudor Trufinescu > >> Dev Lead > >> Sql Server Reporting Services > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> > >> "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message > >> news:553a0349.0408131324.2066b3c8@posting.google.com... > >> > I made a ASP.NEt application that runs on my local machine to display > >> > reports as PDF's. When I moved the code to a project that is in Source > >> > Safe, and points to remote servers, it Times out. I'm concerned, how > >> > does the Render method in the Source Safe project know what Report > >> > Server to look at? The syntax does not specify. It only give the > >> > project name and report name (project/reportname) > >> > > >> > Here is the code I made for my local machine: > >> > > >> > 'Render using the SOAP API Call > >> > > >> > Dim strFilePathway As String = "C:\Documents and > >> > > >> > Settings\rwiethor\Desktop\SOAP_Render.pdf" > >> > Dim rs As New ReportingWebRef.ReportingService > >> > > >> > rs.Credentials = System.Net.CredentialCache.DefaultCredentials > >> > > >> > > >> > 'Setup Arguments > >> > Dim Result As Byte() = Nothing > >> > Dim strReportName As String = "/PRC_Test2/PRC1" > >> > Dim strFormat As String = "PDF" > >> > Dim HistoryID As String = Nothing > >> > Dim DevInfo As String = Nothing > >> > > >> > ''Setup Parameters > >> > Dim Parameters(0) As ReportingWebRef.ParameterValue > >> > Parameters(0) = New ReportingWebRef.ParameterValue > >> > Parameters(0).Name = "ParcelID" > >> > Parameters(0).Value = cboParcelID.SelectedValue.ToString > >> > > >> > Dim Credentials As ReportingWebRef.DataSourceCredentials() = > >> > Nothing > >> > Dim ShowHideToggle As String = Nothing > >> > Dim Encoding As String 'Output variable > >> > Dim MimeType As String 'Output variable > >> > Dim Warnings As ReportingWebRef.Warning() = Nothing > >> > Dim ReportHistoryParameters As > >> > ReportingWebRef.ParameterValue() = > >> > > >> > Nothing > >> > Dim StreamIDs As String() = Nothing > >> > Dim SH As New ReportingWebRef.SessionHeader > >> > rs.SessionHeaderValue = SH > >> > > >> > Try > >> > Result = rs.Render(strReportName, strFormat, HistoryID, > >> > DevInfo, > >> > Parameters, Credentials, ShowHideToggle, > >> > Encoding, > >> > MimeType, ReportHistoryParameters, Warnings, > >> > StreamIDs) > >> > SH.SessionId = rs.SessionHeaderValue.SessionId > >> > > >> > > >> > Catch SOAPe As SoapException > >> > Console.WriteLine(SOAPe.Message) > >> > Response.Write("<SOAP ERROR<BR>" & SOAPe.Detail.OuterXml) > >> > Console.Write(SOAPe.Detail.OuterXml) > >> > Catch ex As Exception > >> > Console.WriteLine(ex.Message) > >> > End Try > >> > > >> > 'Write the contents of the report to a file > >> > Try > >> > Dim Stream As FileStream = File.Create(strFilePathway, > >> > > >> > result.Length) > >> > Stream.Write(Result, 0, Result.Length) > >> > Stream.Close() > >> > Catch ex As Exception > >> > Response.Write("& ex.Message) > >> > End Try > >> > rs.Dispose() > >> > > >> > > >> > 'USe the Utils Class to open a new window and pass the URL, > >> > and > >> > 'display the PDF in the page > >> > Dim strPageName As String = "DisplayPDF.aspx" > >> > Dim strURL As String > >> > strURL = "file:///C:/Documents%20and% > >> > > >> > 20Settings/rwiethor/Desktop/SOAP_Render.pdf" > >> > Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, > >> > "DiplayPDf", > >> > > >> > True) > >> > > >> > 'Tell me when its done > >> > Response.Write("Done") > >> > > >> > This code will generate a byte array, write it to a file (PDF), and > >> > call a new window, open it up and display the file in IE. > >> > > >> > However, when I copied the above code to a page in the project in > >> > source safe, the Session times out at the Render method. > >> > > >> > I have viewed reports in the project using the ReportViewer control, > >> > so I know the ReportServer is up and running. I also can see them > >> > using the Report Manager. > >> > > >> > > >> > I'm concerned, how does the Render method in the Source Safe project > >> > know what Report Server to look at? The syntax does not specify. It > >> > only give the project name and report name (project/reportname). > >> > Versus the Report viewer control actually builds a string containing > >> > the path to the reportserver, and the report. > >> > > >> > Can anyone shed some light on this so I can understand better? > >> > > >> > thanks, > >> > rwiethorn > >> > > >> > rwiehtorn_bad-Spam@belcan.com > >
You can change it there or change it in code. You might want to take a look at some of the sample apps that come with Reporting Services to see how the proxy is used. -- Brian Welcker Group Program Manager Microsoft SQL Server Reporting Services This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "rwiethorn" <rwiethorn@discussions.microsoft.com> wrote in message news:FD68D21D-CB6F-4DC0-8C0D-B28C6002AA60@microsoft.com... > Brian, > Thanks for the reply. > Again, I'm ignorant and trying to learn. Can I change the value in the > Proxy > Object? In the VB project I click on the Properties tab, and I can see an > Entry for Web Refernce URL. The value is: > "http://localhost/reportserver/reportservice.asmx?wsdl" > > Is this the Proxy Object? and if so, changing it here might help my > problem? > > Thanks again, > rwiethorn > rwietjhorn-Bad_spam@belcan.com > > > "Brian Welcker [MSFT]" wrote: > >> The proxy object is a class that VB generates when you add a web >> reference. >> By default, it will have the name of the server you are connecting to. >> >> -- >> Brian Welcker >> Group Program Manager >> SQL Server Reporting Services >> >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message >> news:553a0349.0408150352.5d22ed86@posting.google.com... >> > Tudor, >> > Thanks for the reply. >> > >> > Sorry for being ignorant, But what is the proxy object? Is it in the >> > VB.net application? or is it in the web reference? >> > >> > Again, thanks for the help, >> > rwiethorn >> > rwiehtorn_bad-Spam@belcan.com >> > >> > >> > >> > >> > "Tudor Trufinescu \(MSFT\)" <tudortr@ms.com> wrote in message >> > news:<OZfOpbYgEHA.3016@tk2msftngp13.phx.gbl>... >> >> It uses the Url property on the proxy object. I think the default is >> >> http://localhost/Reportser. Set it explicitly before making the call. >> >> >> >> -- >> >> Tudor Trufinescu >> >> Dev Lead >> >> Sql Server Reporting Services >> >> This posting is provided "AS IS" with no warranties, and confers no >> >> rights. >> >> >> >> >> >> "rwiethorn" <rwiethorn2002@yahoo.com> wrote in message >> >> news:553a0349.0408131324.2066b3c8@posting.google.com... >> >> > I made a ASP.NEt application that runs on my local machine to >> >> > display >> >> > reports as PDF's. When I moved the code to a project that is in >> >> > Source >> >> > Safe, and points to remote servers, it Times out. I'm concerned, how >> >> > does the Render method in the Source Safe project know what Report >> >> > Server to look at? The syntax does not specify. It only give the >> >> > project name and report name (project/reportname) >> >> > >> >> > Here is the code I made for my local machine: >> >> > >> >> > 'Render using the SOAP API Call >> >> > >> >> > Dim strFilePathway As String = "C:\Documents and >> >> > >> >> > Settings\rwiethor\Desktop\SOAP_Render.pdf" >> >> > Dim rs As New ReportingWebRef.ReportingService >> >> > >> >> > rs.Credentials = >> >> > System.Net.CredentialCache.DefaultCredentials >> >> > >> >> > >> >> > 'Setup Arguments >> >> > Dim Result As Byte() = Nothing >> >> > Dim strReportName As String = "/PRC_Test2/PRC1" >> >> > Dim strFormat As String = "PDF" >> >> > Dim HistoryID As String = Nothing >> >> > Dim DevInfo As String = Nothing >> >> > >> >> > ''Setup Parameters >> >> > Dim Parameters(0) As ReportingWebRef.ParameterValue >> >> > Parameters(0) = New ReportingWebRef.ParameterValue >> >> > Parameters(0).Name = "ParcelID" >> >> > Parameters(0).Value = cboParcelID.SelectedValue.ToString >> >> > >> >> > Dim Credentials As ReportingWebRef.DataSourceCredentials() = >> >> > Nothing >> >> > Dim ShowHideToggle As String = Nothing >> >> > Dim Encoding As String 'Output variable >> >> > Dim MimeType As String 'Output variable >> >> > Dim Warnings As ReportingWebRef.Warning() = Nothing >> >> > Dim ReportHistoryParameters As >> >> > ReportingWebRef.ParameterValue() = >> >> > >> >> > Nothing >> >> > Dim StreamIDs As String() = Nothing >> >> > Dim SH As New ReportingWebRef.SessionHeader >> >> > rs.SessionHeaderValue = SH >> >> > >> >> > Try >> >> > Result = rs.Render(strReportName, strFormat, HistoryID, >> >> > DevInfo, >> >> > Parameters, Credentials, ShowHideToggle, >> >> > Encoding, >> >> > MimeType, ReportHistoryParameters, Warnings, >> >> > StreamIDs) >> >> > SH.SessionId = rs.SessionHeaderValue.SessionId >> >> > >> >> > >> >> > Catch SOAPe As SoapException >> >> > Console.WriteLine(SOAPe.Message) >> >> > Response.Write("<SOAP ERROR<BR>" & >> >> > SOAPe.Detail.OuterXml) >> >> > Console.Write(SOAPe.Detail.OuterXml) >> >> > Catch ex As Exception >> >> > Console.WriteLine(ex.Message) >> >> > End Try >> >> > >> >> > 'Write the contents of the report to a file >> >> > Try >> >> > Dim Stream As FileStream = File.Create(strFilePathway, >> >> > >> >> > result.Length) >> >> > Stream.Write(Result, 0, Result.Length) >> >> > Stream.Close() >> >> > Catch ex As Exception >> >> > Response.Write("& ex.Message) >> >> > End Try >> >> > rs.Dispose() >> >> > >> >> > >> >> > 'USe the Utils Class to open a new window and pass the URL, >> >> > and >> >> > 'display the PDF in the page >> >> > Dim strPageName As String = "DisplayPDF.aspx" >> >> > Dim strURL As String >> >> > strURL = "file:///C:/Documents%20and% >> >> > >> >> > 20Settings/rwiethor/Desktop/SOAP_Render.pdf" >> >> > Utils.CreateWindow(Me.Page, strURL, 750, 550, True, True, >> >> > "DiplayPDf", >> >> > >> >> > True) >> >> > >> >> > 'Tell me when its done >> >> > Response.Write("Done") >> >> > >> >> > This code will generate a byte array, write it to a file (PDF), and >> >> > call a new window, open it up and display the file in IE. >> >> > >> >> > However, when I copied the above code to a page in the project in >> >> > source safe, the Session times out at the Render method. >> >> > >> >> > I have viewed reports in the project using the ReportViewer control, >> >> > so I know the ReportServer is up and running. I also can see them >> >> > using the Report Manager. >> >> > >> >> > >> >> > I'm concerned, how does the Render method in the Source Safe project >> >> > know what Report Server to look at? The syntax does not specify. It >> >> > only give the project name and report name (project/reportname).
Don't see what you're looking for? Try a search.
|
|
|