crystal-reports - Crystal Reports,没有从我的公式中获取值以显示在报告字段中
问题描述
我的报告中有记录,其中包含“masterTypeId”和“amount”字段。在我的报告页脚中,我有一个字符串字段“@UnboundString30”。公式为:
(Local NumberVar r;
r := 0;
WhileReadingRecords;
if{Table.masterTypeId}=2
then r := r + {Table.amount})
公式工作室将保存并关闭。当我运行报告时,@UnboundString30 始终为 0,尽管有许多 masterTypeId 为 2 和许多数量。在我看来,我需要告诉我的字段它应该是 r 的值,但我不知道该怎么做?
谢谢!
解决方案
看起来你错过了回报。尝试在线添加,如下所示:
Local NumberVar r;
r := 0;
WhileReadingRecords;
if{Table.masterTypeId}=2
then r := r + {Table.amount};
r; //this is the return
推荐阅读
- reactjs - 为什么我在使用 React Movie App 时收到错误 422“必须提供查询”?
- asp.net-mvc - Identity Server 4 多租户注销
- javascript - 如何根据角度条件在 3 秒后调用事件
- regex - 正则表达式
- azure - 团队变更后看板上缺少工作项
- spring - AbstractTaskletStepBuilder 类型中的方法 stream(ItemStream)
> 不适用于参数 ( - machine-learning - 是否可以在测试数据上应用图像预处理技术
- python - python和用户定义的函数
- python - 调试 Plotly 表面标题未更新
- c# - 沉默特定异常