trying to render a pdf oput of RS from ASP.NET
here is the code
Dim rs As New ReportServices.ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim result As Byte() = Nothing
Dim param(0) As ReportServices.ParameterValue
param(0) = New ReportServices.ParameterValue
param(0).Name = "CPLID"
param(0).Value = intCPLID
result = rs.Render("myReports/rptConfirmation", "PDF", Nothing, Nothing, param, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Dim STREAM As FileStream = File.Create("report.pdf", result.Length)
STREAM.Write(result, 0, result.Length)
STREAM.Close()
unfortunatately i get a 401 error... i suspect its a credentials thing... but if i user something like
Dim strScript As String = "<script>window.open('" & ConfigurationSettings.AppSettings("Reportserver") & "rptConfirm&rs:Command=Render&CPLID=" & intCPLID _
& "','_new', 'toolbar=no,menubar=no,location=no');</script>"
Response.Write(strScript)
its fine coming out the asp.net account..
need help quick!!!
thanks all
here is the code
Dim rs As New ReportServices.ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim result As Byte() = Nothing
Dim param(0) As ReportServices.ParameterValue
param(0) = New ReportServices.ParameterValue
param(0).Name = "CPLID"
param(0).Value = intCPLID
result = rs.Render("myReports/rptConfirmation", "PDF", Nothing, Nothing, param, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Dim STREAM As FileStream = File.Create("report.pdf", result.Length)
STREAM.Write(result, 0, result.Length)
STREAM.Close()
unfortunatately i get a 401 error... i suspect its a credentials thing... but if i user something like
Dim strScript As String = "<script>window.open('" & ConfigurationSettings.AppSettings("Reportserver") & "rptConfirm&rs:Command=Render&CPLID=" & intCPLID _
& "','_new', 'toolbar=no,menubar=no,location=no');</script>"
Response.Write(strScript)
its fine coming out the asp.net account..
need help quick!!!
thanks all

Comment