Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client showing multiple times

Status
Not open for further replies.
Apr 7, 2003
31
US
I have a report that is selecting clients in a specific hospital program, and puts them on a report. In the report I group them by Dr., and then Location.

One of the tables that I am pulling from is a has the client's "other" practitioners (i.e. social worker, Recreational Therapist, Occupational Therapist, etc.). On the report, I want to show the of the Social worker only (no other practitioners), so I created the following formula:

if({user_other_prac_grid.type_of_practitioner_Value} LIKE "Social Worker")then (local stringvar array namearray := split({user_other_prac_grid.practitioner_name_Value},","); namearray[2]) else ""

(The first part is for the Social Worker selection, the second part is so that it only has the person's first name.)

The problem is that if a client has more than one practitioner assigned, then it puts another line for that client leaving the Social Worker field blank (because of the formula selection).

If I use the same formula in the record selection, then it only gives me clients in the selected program that have a social worker listed in the grid. I need to have all people in the selected program wether or not they have a social worker, and if they have a social worker assigned, then to put the name of the social worker in that field, but I only want each client once.

Any suggestions?

Thanks in advance!

Jim Johnson
IT Specialist
Wyoming State Hospital
 
One solution would be to use a linked subreport to get the SW.

A simpler solution would be to group your records by Client, and hide the details and GH for this group. Put all of the detail fields in the client's group footer.

Then sort the records by the formula you have above, which should put the social workers record last in the group (if it exists). This will be the record and fields that shows up in the group footer.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top