水晶报表 - 特定组的总计运行 [英] Crystal reports - running total for specific groups
问题描述
我有4个组,我只想拥有其中2个组的运行总计,并显示第二组后的总数。有办法吗?
I have 4 groups and I only wanted to have running totals for 2 of them and show the total after the second group. Is there a way to do this?
Group1
DetailsA
records ...
Group1
DetailsA
records...
Group2
详细信息A
记录...
Group2
DetailsA
records...
TOTAL - SUM(记录)
Group3
详细信息A
records ...
Group3
DetailsA
records...
Group4
详细信息A
records ....
Group4
DetailsA
records....
推荐答案
有以下几种方法:
或
(2)在公式集上为现有组1和2添加更高级别的分组,对于组3和4在组中添加2,然后将相应字段的和添加到(在公式不是1的情况下应该抑制)。为此:
(2) Add a higher level of grouping on a formula set to 1 for the existing groups 1 and 2, and as 2 for groups 3 and 4, then add a sum of the appropriate field to the group footing section for the formula group (which should be suppressed where the formula is not 1). To do so:
- 添加一个名为TopGroup的新公式字段(例如)。
- p>给出一个公式如下:
- add a new formula field called TopGroup (for example).
give it a formula like:
if {TableName.GroupField} =
Group1 或{TableName.GroupField} =
Group2 then 1 else 2
在TopGroup上插入新群组。 您可能会发现现在是分组的最低级别 - 打开分组专家,使其成为分组的最高级别。
Insert a new group on TopGroup. You will probably find that this is now the lowest level of grouping - open the Group Expert to make it the top level of grouping.
你可能需要在报表的其他地方显示运行总计,然后我建议第一种方法,否则我个人会喜欢第二种方法。
If it turns out you are likely to need to display the running total elsewhere in the report then I would suggest the first method, otherwise I personally would prefer the second.
这篇关于水晶报表 - 特定组的总计运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!