4

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

   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

我尝试过使用运行总计,但似乎无法做到这一点。我也尝试将最大部分放入公式中,但水晶仍然不会总结它。

4

1 回答 1

5

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;
于 2013-04-22T16:38:14.723 回答