Skip to Content
0
Former Member
Mar 24, 2009 at 09:45 PM

.NET 2.0 - WebClient download with viewrpt.cwr

111 Views

Here is the code from .Net Side. When we are executing this code from .NET 2.0 and BusinessObject 11.0, this is working and we get the crystal report results in a PDF file.

But when we are executing the same code from .NET 2.0 and Business Object 11.5, this code is not getting the Crystal report result in a pdf file.

Any help?

=====================================================================

using System;

using System.Web;

using System.Web.Services;

using System.Web.Services.Protocols;

using System.IO;

using System.Net;

==============================================================

.NET 2.0 and Business Object 11.0 code - Working code

===================================================

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public class Service : System.Web.Services.WebService

{

public Service () {

//Uncomment the following line if using designed components

//InitializeComponent();

}

[WebMethod]

public string Get_PDF_From_BO_11() {

WebClient client = new WebClient();

client.DownloadFile(@"http://fecas036.fec.gov:8080/businessobjects/enterprise115/viewrpt.cwr?id=43204≈suser=*****&apspassword=******≈sauthtype=secEnterprise&cmd=EXPORT&EXPORT_FMT=U2FPDF:0≺omptex-P_LETTER_SEQ=1011620090000647823", @"C:\PDFTEST\BO_11.pdf");

return "Done";

}

==============================================================

.NET 2.0 and Business Object 11.5 code , which is not getting the Crystal Report results in a pdf file.

a blank pdf file is created

=============================================================

[WebMethod]

public string Get_PDF_From_BO_11_5()

{

WebClient client = new WebClient();

client.DownloadFile(@"http://fecds018.fec.gov:8080/businessobjects/enterprise11/viewrpt.cwr?id=52861≈suser=******&apspassword=*******≈sauthtype=secEnterprise&cmd=EXPORT&EXPORT_FMT=U2FPDF:0≺omptex-P_LETTER_SEQ=1011620090000647823", @"C:\PDFTEST\BO_11_5.pdf");

return "done";

}

}