I am using Crystal Reports 9 and MS SQL DB.
Its a new job and Crystal is new to me, I really need some help.
The simplified version of the problem is
I have two tables
Members and PD
Members table has the following
Mem_id
Mem_Status
PD table has the following
PD_ID
PD_MEM_ID
PD_Status
My criteria is that the report should bring back all members with Mem_status = 94
Who don’t have a PD Record
As well as those who do have a pd record
The results should be grouped by the PD status.
The problem I am facing is:
Some members have multiple PD records, and the results should then only show one record for these members,
If member has PD then
if pd_Status = 30 then show that record only
if not then show for the next group
but only show one record for this person.
Basically if the member has a PD_Status of 22 then show that record if not then show any other record but only one record.
MEM table
MEM ID Mem_Status
1 94
2 94
3 94
4 94
PD Table
PD_ID PD_MEM_ID PD_Status
12 1 30
13 1 95
14 2 30
15 2 95
16 4 99
Results
MEM_ID MEM_Status PD_Status
1 94 30
2 94 30
3 94 (null) as there is no PD
4 94 99
Any help would appreciated.
Idd
Its a new job and Crystal is new to me, I really need some help.
The simplified version of the problem is
I have two tables
Members and PD
Members table has the following
Mem_id
Mem_Status
PD table has the following
PD_ID
PD_MEM_ID
PD_Status
My criteria is that the report should bring back all members with Mem_status = 94
Who don’t have a PD Record
As well as those who do have a pd record
The results should be grouped by the PD status.
The problem I am facing is:
Some members have multiple PD records, and the results should then only show one record for these members,
If member has PD then
if pd_Status = 30 then show that record only
if not then show for the next group
but only show one record for this person.
Basically if the member has a PD_Status of 22 then show that record if not then show any other record but only one record.
MEM table
MEM ID Mem_Status
1 94
2 94
3 94
4 94
PD Table
PD_ID PD_MEM_ID PD_Status
12 1 30
13 1 95
14 2 30
15 2 95
16 4 99
Results
MEM_ID MEM_Status PD_Status
1 94 30
2 94 30
3 94 (null) as there is no PD
4 94 99
Any help would appreciated.
Idd