K
Kiran
Hi,
I have my reports at http:\\localhost\ReportServer and need to use them in
ASP.NET Web Form.I have a few questions reg. this
------> I want to generate a PDF when a button labeled "Generate Report" is
clicked"
(1) I tried this using the below code:
Dim myResponse As Byte()
Dim url As String = http://localhost/reportserver?/Reports/Sales
Invoice&ORDER_ID=1879&rs:Format=PDF
Dim myWebClient As New WebClient
myWebClient.Credentials = CredentialCache.DefaultCredentials
myResponse = myWebClient.DownloadData(url)
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=Sales
Invoice.PDF")
Response.BinaryWrite(myResponse)
But got the error "The remote server returned an error: (403) Forbidden"
I have included "<identity impersonate="true"/>" in Web.Config File.
This Error is because the Credentials is null. I don't know why the
credentials are null even after I use myWebClient.Credentials =
CredentialCache.DefaultCredentials
The same code works if I Create new Credentials specifying UserName and
Password. But I am cannot specify Username and password. The Application has
take the credentials from the server.
(2) Why can't I use the following one line of code(This works, I want to
know are there any kind issues with
this)Response.Redirect(http://localhost/reportserver?/Reports/Sales
Invoice&ORDER_ID=1879&rs:Format=PDF)
(3) What are other ways to integrate reports with ASP.NET Web Form.
(4)I need to deploy the Reports that I created in my machine to the server
I tried to deploy setting TargetServerURL=http://servername/ReportServer in
Project Properties, but got the error
"The permissions granted to user are insufficient for performing this
operation". What kind of permissions are required.
(5)What are different ways to deploy Reports on a Server.
I have my reports at http:\\localhost\ReportServer and need to use them in
ASP.NET Web Form.I have a few questions reg. this
------> I want to generate a PDF when a button labeled "Generate Report" is
clicked"
(1) I tried this using the below code:
Dim myResponse As Byte()
Dim url As String = http://localhost/reportserver?/Reports/Sales
Invoice&ORDER_ID=1879&rs:Format=PDF
Dim myWebClient As New WebClient
myWebClient.Credentials = CredentialCache.DefaultCredentials
myResponse = myWebClient.DownloadData(url)
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=Sales
Invoice.PDF")
Response.BinaryWrite(myResponse)
But got the error "The remote server returned an error: (403) Forbidden"
I have included "<identity impersonate="true"/>" in Web.Config File.
This Error is because the Credentials is null. I don't know why the
credentials are null even after I use myWebClient.Credentials =
CredentialCache.DefaultCredentials
The same code works if I Create new Credentials specifying UserName and
Password. But I am cannot specify Username and password. The Application has
take the credentials from the server.
(2) Why can't I use the following one line of code(This works, I want to
know are there any kind issues with
this)Response.Redirect(http://localhost/reportserver?/Reports/Sales
Invoice&ORDER_ID=1879&rs:Format=PDF)
(3) What are other ways to integrate reports with ASP.NET Web Form.
(4)I need to deploy the Reports that I created in my machine to the server
I tried to deploy setting TargetServerURL=http://servername/ReportServer in
Project Properties, but got the error
"The permissions granted to user are insufficient for performing this
operation". What kind of permissions are required.
(5)What are different ways to deploy Reports on a Server.