如何在Crystal Report中传递参数值?

时间:2013-05-11 18:46:45

标签: c# asp.net crystal-reports

我通过搜索谷歌找到了一些方法,但它对我不起作用。这是我的代码:

thongkedonhang rpt = new thongkedonhang();
            ParameterFields pfields = new ParameterFields();
             ParameterField pfieldSTAFF = new ParameterField();
           ParameterDiscreteValue disValSTAFF = new ParameterDiscreteValue();
           disValSTAFF.Value = tungay;
           pfieldSTAFF.Name = "d1";
           pfieldSTAFF.CurrentValues.Add(disValSTAFF);

              pfields.Add(pfieldSTAFF);

         crpt_thongkedondh.ParameterFieldInfo = pfields;

1 个答案:

答案 0 :(得分:0)

thongkedonhang rpt = new thongkedonhang();
thongkedonhang .SetParameterValue("ParameterName", disValSTAFF);

代替ParameterName设置{{1p>的值}