在Crystal Reports中,如何计算“详细信息”部分中的所有行并将该计数放在标题中? [英] In Crystal Reports, How do I count all the rows in the Details section and place that count in the header?

查看:180
本文介绍了在Crystal Reports中,如何计算“详细信息”部分中的所有行并将该计数放在标题中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试添加新公式并使用此代码:

  whileprintingrecords; 
numbervar x;
x:= x + 1;问题是,如果我放置在标题部分显示计数的公式,它只显示第一个值,因为它还没有增加。



我需要在每一页的行的总数,只是显示在标题。我如何做到这一点?



等我知道它是放在一个组而不是在细节部分。让我修改我的问题。如何获取报表最后一页中的显示公式的值?说得通?

解决方案

获取报表中所有行的总数并将其放在页眉中的最简单方法是创建具有值的新公式:

  Count({Table.Value})

并将其放在页眉中(其中Table.Value是数据集中的字段)。



EDIT:要获取所有组的总数,请将公式更改为:

  DistinctCount GroupField})


I've tried adding a new formula and used this code:

whileprintingrecords;
numbervar x;
x := x + 1;

Problem is, if I place the formula that displays the count on the header section, it only shows the first value since it hasn't yet incremented.

I need a total count of the rows in every page and just show it in the header. how do I do this?

Wait I just realized it is placed in a group not in the details section. Let me revise my question. How do I get the value of the display formula in the last page of the report? Makes sense?

解决方案

The simplest way to get a total count of all the rows within the report and place it in the page header is to create a new formula, with the value:

Count ({Table.Value})

and place it in your page header (where Table.Value is a field in your dataset).

EDIT: To get a total count of all the groups, change the formula to:

DistinctCount ({Table.GroupField})

这篇关于在Crystal Reports中,如何计算“详细信息”部分中的所有行并将该计数放在标题中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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