I'm using version 14.0.2.364 CR and having trouble building a customized treatment plan report for our case workers to manage to filter out duplicates. I'll do my best to give a layout and criteria:
GH: CDCLIENT.SAI_ID STAFF.SORT_NAME
Case # | First Name | Last Name | Home Phone | DOB | Tx Plan Start Date | Tx Plan End Date |
---|---|---|---|---|---|---|
CDCLIENT.CASE_NUM | CDCLIENT.FIRST_NAME | CDCLIENT.LAST_NAME | CDCLIENT.PHONE | CDCLIENT.DOB | PLAN.BEG_DATE | PLAN.END_DATE |
GF: CDCLIENT.SAI_ID STAFF.SORT_NAME
The problem is that when pulling data for each client, it will bring forward all their tx plans, but I just want to show the newest one. I was inclined to go to section expert > Select Details > Suppress (No Drill down) and in X-2, put the following:
if {CDCLIENT.CASE_NUM} = next({CDCLIENT.CASE_NUM}) then true else false
This will suppress duplicate records ONLY if I have this sorted by Case #. The problem is, we want to sort by Tx Plan End Date, so case workers can identify which clients are coming up for expiring tx plans. The way the data is stored, I have the first 5 columns from one table, and the last two in another. I also tried to format the field, go to "Commons" on CASE_NUM and choose Suppress (if Duplicated) in combination with the Section Expert, but it was still pulling both if I have it the sort order start at PLAN.END_DATE.
Is there a way to preserve the most recent begin / end date and suppress any duplicates without sorting it by case #?