I have this column of fields that are inserted to the report as Summary max fields, yet this column needs to be summarized but I am having difficulties to make this summarization. AS one cannot summarize on such a field.
You can't summarise a summary, that' basic to Crystal. But if you're going a summary on a group and want it for the whole report, you can make a new summary total using the same rules for the whole report.
If you're not already familiar with Crystal's automated totals, see FAQ767-6524.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
You should be more specific about what you are trying to do. If you are trying to sum group maximums, then you could use a variable, like this:
//{@summax} to be placed in the group section containing the maximum summary:
whileprintingrecords;
numbervar summax := summax + maximum({table.amt},{table.groupfield});
//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar summax;
If you want the new summary in a higher order group #1 (for example), then you would need a reset formula in the GH#1:
whileprintingrecords;
numbervar summax;
if not inrepeatedgroupheader then
summax := 0;
There is a change. It has to sum across the line.
One field is a Group Sum (4 of them) and the other is a group Max (also 4 of them).
The result of this formula is a little higher than it should be:
WhileprintingRecords;
Numbervar q1;
q1:=q1+ (sum ({@Quoted 1}, {Command.CUSTNAME})) + Sum ({@Quoted 2}, {Command.CUSTNAME}) +Sum ({@Quoted 3}, {Command.CUSTNAME}) + Sum ({@Quoted 4}, {Command.CUSTNAME}) + Maximum ({@Billed 1}, {Command.CUSTNAME}) + Maximum ({@Billed 2}, {Command.CUSTNAME}) + Maximum ({@Billed 3}, {Command.CUSTNAME}) + Maximum ({@Billed 4}, {Command.CUSTNAME});
q1;
You need to display the results in a separate formula that does not also accumulate, as in, which should be placed in the appropriate footer section (you still haven't said whether you are looking for a report total or a higher order group total):
Or are you saying that you ONLY need to sum them at their own group level? If so, you don't need a variable, just a formula like this:
sum ({@Quoted 1}, {Command.CUSTNAME})) +
Sum ({@Quoted 2}, {Command.CUSTNAME}) +
Sum ({@Quoted 3}, {Command.CUSTNAME}) +
Sum ({@Quoted 4}, {Command.CUSTNAME}) +
Maximum ({@Billed 1}, {Command.CUSTNAME}) +
Maximum ({@Billed 2}, {Command.CUSTNAME}) +
Maximum ({@Billed 3}, {Command.CUSTNAME}) +
Maximum ({@Billed 4}, {Command.CUSTNAME})
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.