组汇总的Crystal Report汇总 [英] Crystal Report Sum of a Group Summary

查看:50
本文介绍了组汇总的Crystal Report汇总的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个报告,试图将一个组的摘要汇总到另一组。例如:

 组1:75≤-最大值的总和
组2:50≤-最大值组
第1行:50
第2行:40
第3行:10
第2组:25<-组
第1行的最大值b $ b第2行:2
第3行:25

我尝试使用总计,但似乎无法做到这一点。我也尝试过将最大部分放入公式中,但是Crystal仍然不会对其进行汇总。

解决方案

如果您绝对必须在Group1标头中包含值,那么我认为您唯一的选择将是SQL表达式。 / p>

Group1页脚会容易得多。要点是,您可以简单地使用变量来跟踪最大值的总和。

  //将此公式放在组1标头
,同时打印记录;
numbervar g1sum:= 0;

//在打印记录时将此公式放在Group2页脚
中;
numbervar g1sum;
g1sum:= g1sum + maximum({table.value},{table.group2_field})

//在打印记录时将此公式放在Group1页脚
中;
numbervar g1sum;


I have a report in which I'm trying to sum a summary on one group to another group. Ex:

   group 1: 75         <- sum of the maximums 
       group 2: 50     <- max of the group
           line 1: 50
           line 2: 40
           line 3: 10
       group 2: 25     <- max of the group
           line 1: 10
           line 2: 2
           line 3: 25

I've tried using a running total, but can't seem to get that right. I've also tried to put the maximum part into a formula, but Crystal still won't summarize it.

解决方案

If you absolutely have to have the value in the Group1 Header then I think your only option will be a SQL Expression.

The Group1 Footer would be much easier. The gist is that you can simply keep track of the sum of the maxes with a variable.

//Place this formula in the Group1 Header
whileprintingrecords;
numbervar g1sum := 0;

//Place this formula in the Group2 Footer
whileprintingrecords;
numbervar g1sum;
g1sum := g1sum + maximum({table.value},{table.group2_field})

//Place this formula in the Group1 Footer
whileprintingrecords;
numbervar g1sum;

这篇关于组汇总的Crystal Report汇总的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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