如何计算Crystal报表中分组行的数量 [英] How to count number of grouped rows in the Crystal Report

查看:54
本文介绍了如何计算Crystal报表中分组行的数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要计算并显示报告中分组数据的行数。我已经在报表页脚部分中拥有了总数据行数(我使用了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


推荐答案

尝试解决方案


  1. 创建公式 @重置。将公式放在 groupheader supress

 Shared Numbervar count;
 count:=0


  • 现在再创建一个公式 @增量并放置在有的部分中,我假设它是详细信息部分,而 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 。将此公式放在组页脚

    Shared Numbervar count;
    Shared Numbervar Count_Final;
    Count_Final:=Count_Final+count;
    count;


  • 现在再创建一个公式 @DisplayFinal 并放入报告页脚

    Shared Numbervar Count_Final;
    Count_Final


  • 这篇关于如何计算Crystal报表中分组行的数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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