我需要将Crystal Report中的公式字段值传递给我在C#中的表单 . 我该怎么做 ?
我的代码是:
ReportDocument RD = new ReportDocument();
txtNumber.Text=RD.DataDefinition.FormulaFields["Formula Field Name"].Text;
注意:数据类型公式字段是数字
此代码将Crystal Report中的公式字段文本添加到C#中的表单中 .
但是,我需要在C#中将Crystal Report中的公式字段值添加到我的表单中?
提前致谢
1 回答
我错了,否则编辑并添加更多内容以供将来参考 .
下面的代码应该从报告字段中获取值
但是上面提到的代码 will not work 如果公式字段名称是 calculated field. Calculated fields 则具有 no 值,直到 Crystal Report engine has done its rendering 为止 .