Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: suppress group based on date range Post Reply Post New Topic
Page  of 2 Next >>
Author Message
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Topic: suppress group based on date range
     Posted: 09 Sep 2013 at 5:07am
I'm trying to suppress a group using the suppress formula here

If NOT({@H / R Date}) IN {@YYYStartDate} TO {@YYYEndDate} Then
    True
Else
    False

I'm getting a boolean required here for the field {@H / R Date}

not sure why though.

any help is always appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Sep 2013 at 5:48am
move your closing paranth
 (and the if-then is completley redundant)
 
NOT({@H / R Date} IN {@YYYStartDate} TO {@YYYEndDate} )
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 09 Sep 2013 at 5:56am
i figured out the paren piece a minute ago. thanks for the reply. however when i use this, it breaks another formula i have so i don't think that I can use this anyway.

no fun.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Sep 2013 at 6:41am
it is likely still not "correct". I was only fixing the syntax. If this was a group select condition you should be referencing some sort of group value like
not(minimum(@ hr,group) in start to end)
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 09 Sep 2013 at 6:48am
well, H / R Date is a formula field that is also used as a group when I group on that field. could that be why it's not working?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Sep 2013 at 7:09am
what is the formula?
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 09 Sep 2013 at 7:30am
if hiredate in start to end then
field
else
if rehiredate in start to end then
field

pretty straight forward. i made it a group because the client only wants to see which employees fall into the the 3 main groups which are hire date, term date and rate change date.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Sep 2013 at 7:42am
hmmm.
if I understand your data they can actually fall into multiple categories. If you group on this you might end up breaking up your employee rows into different groupings which breaks your other calculations (which use previous / next).
 
IP IP Logged
bwsanders
Senior Member
Senior Member


Joined: 05 Sep 2012
Location: United States
Online Status: Offline
Posts: 177
Quote bwsanders Replybullet Posted: 09 Sep 2013 at 7:47am
it's fields from diff tables so that shouldn't affect the previous formula that i have.


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Sep 2013 at 8:30am
still feel like i am working in the dark o this but i think if your @ HR is correct you can use a group select using the maximum of that per employee in the group select 
IP IP Logged
Page  of 2 Next >>
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