Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Filter on found set Post Reply Post New Topic
Author Message
georgec
Newbie
Newbie


Joined: 14 May 2012
Online Status: Offline
Posts: 2
Quote georgec Replybullet Topic: Filter on found set
     Posted: 14 May 2012 at 5:03am
I have built a report that returns child data(c) where the string values can be one of 1,2,3,5,8. I would like to filter the selection down to just the parents whose child values are either 2 or 8 only, meaning that the parents only have child data that are 2 and/or 8.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 14 May 2012 at 5:12am

if you are looking for a crystal only solution (meaning you do not want to useĀ  stored proc or its equivalent) you can use group select expert to achieve this.

group on the parent record
create a 'flag' formula field to convert the values in the child records into a useable function.
//flag
if field in ['2','8'] thenĀ 0 else 1
now you can insert a maximum of the flag field at the group level
maximum(@flag,group)
any group that has a mx=0 meets your criteria so you can use that int eh select expert (set to group)
maximum(@flag,group)=0
IP IP Logged
georgec
Newbie
Newbie


Joined: 14 May 2012
Online Status: Offline
Posts: 2
Quote georgec Replybullet Posted: 14 May 2012 at 3:29pm
Thanks DBlank, I think that is going to be the solution for me.
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