Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export pdf

Status
Not open for further replies.

warka

Programmer
Oct 15, 2003
2
FR
I am using Crystal Report for VS.NET 2003
i want to export to pdf.

error message:

CrystalDecision.crystalReport.Engine.ExportException

"Erreur dans le fichier C:\WINDOWS\TEMP\temp_88e728c2-1fe5-4163-b1bf-d3ebb01d5172.rpt :Erreur détectée par la DLL d'exportation

please help me ?
 
Thank you,

in fact, i can't export
my dataSet is full. My report is load in html format

I don't understand

My source:
this.oRpt.SetDataSource(dsGlobal1);

crvCv.ReportSource = this.oRpt;


string Fname;
// this.oRpt.Load();
string DossierIn = "In/"+System.Web.HttpContext.Current.User.Identity.Name + "/" + System.Web.HttpContext.Current.Session.SessionID;
string TmpFileDestination = System.Web.HttpContext.Current.Server.MapPath(DossierIn);
if (!System.IO.Directory.Exists(TmpFileDestination))
System.IO.Directory.CreateDirectory(TmpFileDestination);
string fileName = System.IO.Path.GetFileName(System.Configuration.ConfigurationSettings.AppSettings["fileCv"]);
Fname = System.IO.Path.Combine(TmpFileDestination,fileName);
ExportOptions crExportOptions = new ExportOptions();
DiskFileDestinationOptions crDiskFileDestinationOptions =new DiskFileDestinationOptions();


//crDiskFileDestinationOptions = new DiskFileDestinationOptions();
crDiskFileDestinationOptions.DiskFileName = Fname;
crExportOptions = oRpt.ExportOptions;
//With crExportOptions
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
//End With
oRpt.Export();


Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.WriteFile(Fname);
Response.Flush();
Response.Close();

string DossierName = "In/"+System.Web.HttpContext.Current.User.Identity.Name;

string TmpFile = System.Web.HttpContext.Current.Server.MapPath(DossierName);

if (System.IO.Directory.Exists(TmpFile))
System.IO.Directory.Delete(TmpFile,true);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top