如何在Crystal报表中使用基于计数的条件词 [英] how to use conditional word based on count in Crystal reports
本文介绍了如何在Crystal报表中使用基于计数的条件词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是Crystal Reports的新手。我需要帮助解决一个愚蠢的问题。我有一个小组部分,我在计算按日期分组的项目。在组页脚中,我正在计算摘要中的记录。但如果该组中只有一个项目,我想显示项目而不是项目。例如:
I am new to Crystal Reports. I need help with a silly problem. I have a group Section where I am counting items grouped by date. On the group footer, I am counting records on the summary. But if there is only one item on that group, I want to show "Item" instead of "Items". For example:
Date.... AgentID Reports
12/3/2014 A10250 3
........ B15210 4
........ 7-Reports
12/4/2014 A10250 1
......... 1-Report
有没有这样做的简单方法是什么?
Is there an easy way of doing it?
推荐答案
我正在使用Crystal Reports 8.5并意识到该字段必须是公式字段而不是文本字段。
这是我用过的适合我的公式。
I am using Crystal Reports 8.5 and realized that field must be Formula Field not a text field.
Here is the formula I used which works for me.
"Report"+ if Count ({proc_CrystalReport_Agent_SummaryReport.ReportID}, {proc_CrystalReport_Agent_SummaryReport.ExtractFileName}) >1 then "s" else ""
这篇关于如何在Crystal报表中使用基于计数的条件词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文