crystal report parameters
I use the following code to pass parameters into a CR
// Reuse myDiscreteValue, and assign second country
myParam = new ParameterField();
myDiscreteValue = new ParameterDiscreteValue();
myParam.Name = "@toDate";
开发者_StackOverflowmyDiscreteValue.Value = RmtUtility.Utility.DisplayDate(toDate);
myParam.CurrentValues.Add(myDiscreteValue);
myParams.Add(myParam);
I get an error message "Missing Parameter Value" when I tried to export the document using CR Option.
:(
Try clearing and then setting the values of the parameters within the Report object.
Something like this:
ParameterDiscreteValue paramDV = new ParameterDiscreteValue();
paramDV.Value = RmtUtility.Utility.DisplayDate(toDate);
report.ParameterFields["@toDate"].CurrentValues.Clear();
report.ParameterFields["@toDate"].DefaultValues.Clear();
report.ParameterFields["@toDate"].CurrentValues.Add(paramDV);
Note: report
being your Crystal Report Document
精彩评论