开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜