CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top