且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取水晶报表中每页字段的总和

更新时间:2023-02-11 23:01:07

您可以按如下方式获取页面级别总计.在报表设计中创建三个公式字段,分别是ff_Reset_Totalff_Current_Totalff_Add_Record,并在公式编辑器中设置它们的值如下:

You can get page level totals as follows. Create three formula fields in report design, namely ff_Reset_Total, ff_Current_Total, ff_Add_Record and set their values in formula editor as under:

  1. ff_Reset_Total

  1. ff_Reset_Total

whileprintingrecords;
numbervar PageTotl;
PageTotl:=0;

  • ff_Current_Total

  • ff_Current_Total

    whileprintingrecords;
    numbervar PageTotl;
    PageTotl;
    

  • ff_Add_Record

  • ff_Add_Record

    whileprintingrecords;
    numbervar PageTotl;
    PageTotl:=PageTotl + {TheField};
    

  • 现在将这些公式字段放入您的报告中,如下所示:

    Now place these formula fields in your report as under:

      页眉部分中的
    1. ff_Reset_Total
    2. 页脚部分中的
    3. ff_Current_Total
    4. ff_Add_Record 在您的详细信息部分
    1. ff_Reset_Total in Page Header Section
    2. ff_Current_Total in Page Footer Section
    3. ff_Add_Record in your Details Section

    现在隐藏 ff_Reset_Totalff_Add_RecordPage Header 中通过 Right Click 每一个详细信息 部分,指向 Format Field,然后在 Common 选项卡中选择 Suppress

    Now hide ff_Reset_Total and ff_Add_Record by Right Click on each of them in Page Header and Details Sections, point to Format Field and then in the Common tab select Suppress