J
JonFruit
Hi,
I have a crystal report on a c# web application form using the crystal
report viewer control. The report has a parameter that I am passing
and it displays perfectly on the form. The problem occurs when I use
the export function of the report to export it to pdf. If I remove
the parameter from the report the export works fine. Here is my
export code:
ExportOptions exportOpts = new ExportOptions();
PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions();
DiskFileDestinationOptions diskOpts = new
DiskFileDestinationOptions();
exportOpts = crReportDocument.ExportOptions;
// Set the excel format options.
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
// Set the disk file options and export.
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
string strDiskFileName = @"C:\Analysis" +
DateTime.Now.Day.ToString().Trim() +
DateTime.Now.Month.ToString().Trim() +
DateTime.Now.Year.ToString().Trim() + ".pdf";
diskOpts.DiskFileName = strDiskFileName;
exportOpts.DestinationOptions = diskOpts;
Any ideas?????
Thanks,
Jon
I have a crystal report on a c# web application form using the crystal
report viewer control. The report has a parameter that I am passing
and it displays perfectly on the form. The problem occurs when I use
the export function of the report to export it to pdf. If I remove
the parameter from the report the export works fine. Here is my
export code:
ExportOptions exportOpts = new ExportOptions();
PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions();
DiskFileDestinationOptions diskOpts = new
DiskFileDestinationOptions();
exportOpts = crReportDocument.ExportOptions;
// Set the excel format options.
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat;
// Set the disk file options and export.
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile;
string strDiskFileName = @"C:\Analysis" +
DateTime.Now.Day.ToString().Trim() +
DateTime.Now.Month.ToString().Trim() +
DateTime.Now.Year.ToString().Trim() + ".pdf";
diskOpts.DiskFileName = strDiskFileName;
exportOpts.DestinationOptions = diskOpts;
Any ideas?????
Thanks,
Jon