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

Question about selecting records 1

Status
Not open for further replies.

Fadius

IS-IT--Management
Jul 25, 2001
139
US
I have a report that is grouped on staff. The report shows each site a staff member works as. WHat I am trying to do is have the report only show those staff members who work at more than one place.

I have a counter in each group that counts the number of sites, but this is counted after the group so I am unable to use this to select only those staff members that are at more than one site.

Any suggestions on how I can accomplish this?
 
If you don't need the detail line it's simple. YOu suppress the Group Header and Detail, the use the Section Expert to put a suppress formula on the Group Footer.
Your formula would be something like:
{@site count} < 2

Then put whatever you want to print in the group footer.
 
Instead of suppression I would use group selection. Go to report->selection formula->GROUP and enter:

distinctcount({table.siteID},{table.employee}) > 1

Then if you need to do calculations (e.g., a count) across employees, insert a running total. The advantage of group selection over suppression is that a running total will give you the result you need without any special criteria added to the evaluation section--it will count just what's displayed. If you were suppressing, you would have to specify the opposite of the suppression criteria in the evaluation section of the running total. And you must use running totals in either case, since inserted summaries would take all records into account whether suppressed or excluded by group selection.

-LB
 
lbass, that worked perfectly. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top