Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

summarise a field in a grou pheader - placing it in a different group

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
I have 3 grouping levels on my report, but have dragged the fields into group 3,so they are displayed on the same line.
One of the fileds is a quantity field.
I want to sum this field at group header 2, but display it in the same line as the rest of the fields (group 3)
I can do the sum and place it in group 2 - which works, but if I drag that down to group 3 it loses the sum at the original grouping level.

how can I acheive what I am looking for?
how can I set the formula field to sum at a certain group level?
 
You can use a formula in Group 3 that could be set based upon another value.
Code:
numberVar G3Sum;
if {table.field} = "Y" then //change this to whatever condition you need
    G3Sum := Sum({table.amount},{table.group3field}) //change this for your needs
else
    G3Sum := 0;
Place this in your group 3 footer.

Create a second formula to display the contents of the variable:
Code:
numberVar G3Sum;
G3Sum;
Place this in your Group 2 Footer.
This is dependent on your condition in the set formula. Because you might have more than one group 3 with in each Group 2, you have make sure that you use logic to pick out the appropriate group, so that you can get the sum that you want.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top