Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Record selection problem :( Post Reply Post New Topic
Author Message
CR_vv
Newbie
Newbie
Avatar

Joined: 25 Oct 2011
Online Status: Offline
Posts: 1
Quote CR_vv Replybullet Topic: Record selection problem :(
     Posted: 25 Oct 2011 at 5:53pm

Hi all - I'm relatively new to Crystal Reports, but I'm having the greatest difficulty with selecting a specific set of records. I've tried everything and looked everywhere, but I can't get it to work!

I have a database that looks like this:

mbr_number     month    closure_date
 
101                     5      
101                     6 
101                     7          15/9/2011
102                     5
102                     6       
102                     7          15/10/2011
 
What I want to do is select the 3 records with member number 101, because one of the closure_date fields for that member falls within September 2011. So if ANY of the closure_date records fall in September I need to select ALL member numbers associated with that record.
 
Hope this makes sense. Appreciate the help!
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Oct 2011 at 3:40am

you can do this as a crystal command or sql view or stored proc but in crystal it is a group select process.

group on mbr_number
create a 'flag' for your sept conditon
if table.closure_date in date(2011,9,1) to date(2011,9,30) then 1
sum this at your group level
sum(@flag,table.mbr_number)
open the select expert
cahnge the toggle to group select
use your conditino here
sum(@flag,table.mbr_number)>0
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