Hi,
i have a problem with export a crystal report to pdf.
I show an existing report with the crystalreportviewer.
There exist a button "export" to export the report.
But I will export the report to pdf automatically, without click the button.
I work with the sample report from Microsoft Visual Studio.net:
C:\Program Files\Microsoft Visual Studio.net\CrystalReports\Samples\Code\Winforms\C#\Simple.csproj
When I click the button "export" in the crystalreportviewer I get this error message:
"Error in file C:\Program Files\Microsoft Visual Studio.net\CrystalReports\Samples\Code\Winforms\C#\Simple.csproj
Operation not yet implemented"
"Export failed"
When I will export the file automatically with this code, I get this error message, too:
ReportDocument crReportDocument;
ExportOptions crExportOptions;
DiskFileDestinationOptions crDiskFileDestinationOptions;
private void button1_Click(object sender, System.EventArgs e)
{
try
{
string exportFilePath = "c:\\exported.pdf";
crReportDocument = new ReportDocument();
crReportDocument.Load(@"C:\\Program Files\\Microsoft Visual Studio .NET\\Crystal Reports\\Samples\\Reports\\General Business\\Income Statement.rpt"
crDiskFileDestinationOptions = new DiskFileDestinationOptions();
crDiskFileDestinationOptions.DiskFileName = exportFilePath;
crExportOptions = crReportDocument.ExportOptions;
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
crReportDocument.Export();
MessageBox.Show("Report exported"
}
catch (Exception excp)
{
MessageBox.Show(excp.ToString());
}
When I open the .rpt with Crystal Reports I can export the report.
Yesterday I've found this article:
I have expand the file crtslv.dll and expmod.dll and unregister and register the DLLs.
But I'm not able to export to RTF and PDF format without error
(the error message is the same).
I work with Crystal Report 9 (update from 8.5 -> 9.0).
What's the problem?
Thanks,
Stephanie
i have a problem with export a crystal report to pdf.
I show an existing report with the crystalreportviewer.
There exist a button "export" to export the report.
But I will export the report to pdf automatically, without click the button.
I work with the sample report from Microsoft Visual Studio.net:
C:\Program Files\Microsoft Visual Studio.net\CrystalReports\Samples\Code\Winforms\C#\Simple.csproj
When I click the button "export" in the crystalreportviewer I get this error message:
"Error in file C:\Program Files\Microsoft Visual Studio.net\CrystalReports\Samples\Code\Winforms\C#\Simple.csproj
Operation not yet implemented"
"Export failed"
When I will export the file automatically with this code, I get this error message, too:
ReportDocument crReportDocument;
ExportOptions crExportOptions;
DiskFileDestinationOptions crDiskFileDestinationOptions;
private void button1_Click(object sender, System.EventArgs e)
{
try
{
string exportFilePath = "c:\\exported.pdf";
crReportDocument = new ReportDocument();
crReportDocument.Load(@"C:\\Program Files\\Microsoft Visual Studio .NET\\Crystal Reports\\Samples\\Reports\\General Business\\Income Statement.rpt"
crDiskFileDestinationOptions = new DiskFileDestinationOptions();
crDiskFileDestinationOptions.DiskFileName = exportFilePath;
crExportOptions = crReportDocument.ExportOptions;
crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
crReportDocument.Export();
MessageBox.Show("Report exported"
}
catch (Exception excp)
{
MessageBox.Show(excp.ToString());
}
When I open the .rpt with Crystal Reports I can export the report.
Yesterday I've found this article:
I have expand the file crtslv.dll and expmod.dll and unregister and register the DLLs.
But I'm not able to export to RTF and PDF format without error
(the error message is the same).
I work with Crystal Report 9 (update from 8.5 -> 9.0).
What's the problem?
Thanks,
Stephanie