Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 823
  • Last Modified:

How to display group totals in group header

I am writing a report that has totals for a single group.  The report layout is:

Report Header:  Suppressed
Page Header:  Title information
Group header 1:  Grouping information, description of group, and difference between group total A and group total B (suppressed if group total A = group total B)
Detail A:  Detail that leads to group total A
Detail B:  Detail that leads to group total B
Group Footer:  Suppressed
Page Footer:  Suppressed
Report Footer:  Suppressed

There is a specific way that this report is to be laid out and I can't change that.  It was written in R&R v 5.1 for an older version of our software, but the newer version requires either R&R9 or Crystal.  Because of the multiple LOJ's, I had to go with Crystal.  R&R has problems with it.  Anyway,  I must write the new crystal report to look EXACTLY like the other.  Don't ask.  I can't seem to get the group to suppress if both of the totals are equal.  I also can't get the difference between the two to display in the group header.  I can display and do all this in the footer, but not in the header.  Is there any way to do this?
0
traigo
Asked:
traigo
  • 2
1 Solution
 
mlmccCommented:
You need to create summaries of the fields and place them in the appropriate footers.  They can then be dragged to the header and will display properly.

mlmcc
0
 
bdreed35Commented:
Just to clarify mlmcc's post:

You need to create summaries by right clicking one of the fields that you want to total, and choose Insert, Summary.
The field to summarize should be populated for you, change the summary type if necessary, and choose the location - should be group 1.
Click OK.
By default, the summaries will be placed in the Footer of the location that you choose - so group footer 1 in your case.
You can drag the summary fields from the group footer into the group header adn they will give you the same result.
Repeat this process for as many summaries that you need.

To suppress a group based upon these summaries, use group selection.
Report menu, Seleciton Formulas, Group.
Enter the following logic:

sum({table.fieldA},{table.group1field}) <> sum({table.fieldB},{table.group1field})

Save and Close.
The Group Selection will only show groups where the 2 summaries are not equal to each other.  This is much easier than suppressing Group Header 1, Details, and Group HEader 2.
0
 
traigoAuthor Commented:
Thanks for the response.  I will do as you have said and let you know of the results.
0
 
traigoAuthor Commented:
Thanks for the great help.  I was able to get the report working per your instructions.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now