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

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

问题描述

我尝试添加一个新公式并使用了以下代码:

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})

并将其放在页面标题中(其中 Table.Value 是数据集中的一个字段).

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

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

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

DistinctCount ({Table.GroupField})

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

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