Skip to Content
0
Former Member
Sep 30, 2013 at 11:30 AM

Download report by using http links (Business Objects 2008)

73 Views

In our company, we are using a reports server with Business Objects 2008 Enterprise. One of our apps tries to generate a report and download it in PDF format. This app is written in C# source code. We use the following link:

http://<BOE_server>:<port>/CrystalReports/viewrpt.cwr?id=<ReportId>&apsauthtype=secEnterprise&apsuser=<login>&apspassword=<password>&promptex0=%2204%22&promptex1=%2220130801%22&promptex2=%2220130831%22&promptex3=%22AGM%22&promptex4=0&init=actx&cmd=EXPORT&EXPORT_FMT=U2FPDF:0

If I use this link in Internet Explorer, the report is launched correctly. But if I use it in our program, it fails. The source code I use is:

WebClient client = new WebClient();

string uriString="http://<BOE_server>:<port>/CrystalReports/viewrpt.cwr?id=<ReportId>&apsauthtype=secEnterprise&apsuser=<login>&apspassword=<password>&promptex0=%2204%22&promptex1=%2220130801%22&promptex2=%2220130831%22&promptex3=%22AGM%22&promptex4=0&init=actx&cmd=EXPORT&EXPORT_FMT=U2FPDF:0"

String sArchivoTemporal = "C:\\Personal\\temporal.pdf";

try{

client.DownloadFile(uriString, sArchivoTemporal);

Console.WriteLine("File downloaded.");

Console.ReadKey();

} catch (Exception ex)

{

Console.WriteLine("Error: "+ex.Message);

Console.ReadKey();

}

We have used this way to download in a server with Business Objects XI for a long time with no errors. I don't know why this program doesn't work now.

I need your help, please.

Regards.