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

Test to see if a field is suppressed

Status
Not open for further replies.

nicatt

Programmer
Apr 2, 2001
43
US
Is there a way to test each line in a detail section to see if one field is suppressed and then count the name. In the below example, I selected the field setting of 'suppress if duplicated' for the name. Can I test if the name text suppression is 1 or 0 for true or false? I can then sum the number of employee names using the 1/0 field with a formula like:

IfName field = (If NameSuppress = 0(False) then 1 else 0).
sum IfName field

For example these three columns:
'name' 'date' 'pay end of month'

Want result set of:

George Mcgillianto 11/11/1901 $300
(suppressed name) 12/11/1901 $330
(suppressed name) 01/11/1902 $310
etc.

Employee count = 1


thanks
 
The formuala equivilant of suppress duplicates is:

{field} = Previous({field})

If what you really want is number of employees however, it would be much easier to do a distinct count.

right click on the name field select summary and choose summary type of distinctcount.

It would probably be better to use something unique, such as SSN or employee ID since you could have two John Doe's

Lisa
 
Dear Nicatt,

Hmm, why wouldn't you do a distinct count?

Click on the employee name field, Click Insert Summary and then select Distinct count from the available summary options.

Regards,

ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Sometimes one makes things too complicated for their own good. Thank you both for your more reasonable suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top