Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Not sure if this is just a logic problem. Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Not sure if this is just a logic problem.
     Posted: 06 Feb 2013 at 9:44am
I want to write a formula or maybe do select expert.

Let's say I have 5 people and each day they get a check or an X. I want to run a report for like the month of December that shows me who all has ALL checks and no X's.

I have a field called employee and I have one called presence. I know that is not much to go on but we had tried a formula that said if any x's then false, but it shows those people on their check's so it doesn't help me.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Feb 2013 at 10:24am
you have to use a group select (or you can use a stored proc).
group on the person and use select where minimum or the maximum of the field = what you want per person
IP IP Logged
Schugs
Newbie
Newbie


Joined: 08 Aug 2012
Online Status: Offline
Posts: 36
Quote Schugs Replybullet Posted: 06 Feb 2013 at 10:31am
You would not want to limit the filter on the select(unless every month or ever report it is a set number of how many "checks" there are).
1.) Instead pull all the information, then group it by the {table.employee} field.
2.) Then create a new formula called "CheckorX"
    If {table.presence}="Check" then 0 else 1
3.) Next suppress the Details Section
4.) for the "Group 1 Header" Section suppress formula type:
    if maximum({@CheckorX},{table.employee})=1 then false else true

and that should do it! Format and design how you want each employee showing up(i.e. name, size, employee ID) in the group 1 header instead of the details.

IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum