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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress subtotal if only one record in group

Status
Not open for further replies.

carynbo

MIS
Feb 11, 2003
57
US
Hi all,

In a Company report, I show Employee names within Dept. I subtotal the number of Employees by Dept. However, if there is only one Employee, I just want to display the Employee name without a subtotal for the Dept.

I tried the following suppression 'logic' in Section Expert, for the Dept group footer, without success:

((previous({DEPTCODE}) <> {DEPTCODE}) and (next({DEPTCODE}) <> {DEPTCODE}))

Can I count the number of employees per department and access that total in the Dept Group Footer?

So far, no success with my attempts to suppress Dept Subtotal where there is only one Employee per Dept. Any ideas will be greatly appreciated!

Caryn.
 
Try using this as your Group Footer suppression formula (don't forget to change the table/field names to your tables):
[tt]
Count ({Table.EmployeeID}, {Table.DEPTCODE}) = 1
[/tt]
-dave
 
Thank you so much Dave -- your solution worked great!

There was one piece I left out of the story -- there are actually multiple Employee records, that show up in aggregate on the Emp group footer. Using your solution I easily test by:
DistinctCount ({Table.EmployeeID}, {Table.DEPTCODE}) = 1

Thanks again! Caryn
 
Hi,

i want to do the same, but in a crosstab. The crosstab is in the report footer. I don't know how to control the groups in the crosstab.

Any ideas would be great.

Thanks.
Joerg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top