Skip to Content
0
Jul 22, 2019 at 08:31 PM

"Missing parameter values" at run time

148 Views Last edit Jul 29, 2019 at 08:47 PM 2 rev

I have a report that runs without any issue when preview in CR or Visual Studio. However, when runs with C# code which provides the parameter values, it threw "Missing parameter values" exception at the following line -
report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
(where report is ReportDocument report)

The error I got is
'repInfo.StreamFile = report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)' threw an exception of type 'CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException'
Data: {System.Collections.ListDictionaryInternal}
ErrorID: MissingParameterFieldCurrentValue
HResult: -2147215870
HelpLink: null
InnerException: {"Missing parameter values."}
Message: "Missing parameter values."
PromptEngineAvailable: false
Source: "CrystalDecisions.ReportAppServer.DataSetConversion"
StackTrace: " at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)\r\n at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)\r\n at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)\r\n at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)\r\n at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)"
TargetSite: {Boolean ThrowDotNetException(System.Exception)}

I'm pretty sure my code provided the needed values. I really appreciate if anyone can shed some lights on the problem.