如何计算水晶报表中的分组行数 [英] How to count number of grouped rows in the Crystal Report
问题描述
我需要计算并显示报告中分组数据的行数.我已经在报告页脚部分有总数据行数(我使用了 Count() 函数并且工作正常),但我需要在显示分组数据行数的组页脚部分中有总行数.问题的可见解释如下所示.
I need to count and show number of rows of grouped data in the report. I already have number of rows of total data in Report Footer section (I used Count() function and that works fine), but I need to have total rows in the Group Footer section which shows number of rows of grouped data. The visible explanation of the problem is shown under.
谢谢.
----------------------------------------------------
Group 1
row 1---------------------------
row 2---------------------------
.
.
.
row N---------------------------
--- I need here number of rows!---------------------
----------------------------------------------------
Group 2
row 1---------------------------
row 2---------------------------
.
.
.
row M---------------------------
--- I need here number of rows!---------------------
----------------------------------------------------
Total Rows: M+N
推荐答案
试试解决方案
创建一个公式
@reset
.将公式放入groupheader
和supress
Shared Numbervar count;
count:=0
现在再创建一个公式 @Increment
并放置在有 rows
的部分我假设它是详细部分和 supress
.
Now create one more formula @ Increment
and place in section where there are rows
I have assumed it as detail section and supress
.
Shared Numbervar count;
count:=count+1;
count;
现在再创建一个公式@Display
.将此公式放在 Group 页脚
Shared Numbervar count;
Shared Numbervar Count_Final;
Count_Final:=Count_Final+count;
count;
现在再创建一个公式@DisplayFinal
并放入Report Footer
Shared Numbervar Count_Final;
Count_Final
这篇关于如何计算水晶报表中的分组行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!