Crystal Reports中的COUNT记录 [英] COUNT Records in Crystal Reports

查看:70
本文介绍了Crystal Reports中的COUNT记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



我有以下记录

Dear,

I have following Records

Student-ID Date  Status
10          3/6     A
10          3/7     P
10          3/8     P
10          3/9     L
 
11          3/6     P
11          3/7     P
11          3/8     A
11          3/9     P





我想算所有具有状态P的指定学生的记录。

我使用组作为学生ID

并添加公式来评估



{状态} =P



并按组重置



但没有正确的结果。



请帮助。



I want to count all records of a specified Student which has the Status "P".
I used group as Student-ID
and added formula to evaluate

{Status} = "P"

and reset by Group

but no correct result.

Please help.

推荐答案

你基本上创建一个公式字段,如:

you basically create a formula field like:
if {mytable.field} = 'P' then
 {mytable.field};



然后


then

count({formula});





或使用带有评估公式的运行总计:



or use running totals with an evaluation formula:

{mytable.field} = 'P'


看一看:在Crystal Report中使用公式 [ ^ ]。这是一步一步的教程。
Have a look: Using Formula in Crystal Report[^]. It's step by step tutorial.


我的问题解决了。



我创建了SQL View,然后从视图添加了字段到Crystal Report因此公式有效。
My Problem solved.

I created SQL View and then added fields from view to Crystal Report, nd hence the formula worked.


这篇关于Crystal Reports中的COUNT记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆