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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Duplicate Records With Label Report 1

Status
Not open for further replies.

thorntong

Programmer
Feb 4, 2009
21
US
Good Morning,
I'm using Crystal XI and I'm having problems with a mailing label report that I cannot seem to prevent duplicate patient addresses from being displayed. The reason that I'm getting duplicate data is because a patient can have multiple doctor visits within a 2 year span. I thought of using a group to minimize the duplicates, but groups do not work well with designing a mailing labels report. I've put together a document for those that would like to see what I am dealing with (please see the attachment link).


If anyone has any suggestions, I would greatly appreciate it.
Cheers,
Glenn
 
You could try inserting a group on the patient and suppressing both group header and footer, and then go to report->selection formula->GROUP and enter:

{table.visitdate} = maximum({table.visitdate},{table.patient])

I haven't tested this, but I think it should work.

If not, you should insert the group on patient, add multiple sections to the group header, and then move the detail fields to the group header sections. Suppress the detail sections and format the group header sections to "suppress blank section."

-LB
 
Thanks LB!

I tried the grouping thing, but the problem with grouping within Crystal Reports is that it interprets data from a top down view. And it my case, this approach does not work as I'm trying to put multiples pieces of data on a single line and each piece is unique. So I guess my only option seems to be simplify the data prior to being read in by Crystal Reports. I really which there were some advanced features within CR XI that allowed us to massage the data more prior to being used within the reports.

Thank you!!
Glenn
 
I gave you two approaches to try. I don't see what the issue is from your file. I do see you have overlapping fields in detail_c--why is that? If there are potential missing fields, still place them in separate detail sections and then format the detail sections to suppress blank sections.

I don't know what you mean about grouping and "top-down view". Why don't you show a sample of what you get when you group so we can troubleshoot it. This should work.

-LB
 
Thank you LB!!!

When I tried first tried the group concept, I had overlooked that I could just 'suppress' the group fields (my fault) and I then ran into an issue with the group records statement as I had to ensure that I was matching the fields in the statement with the ones from the 'Group By'. But I've got it all working now, thanks to you!!

Cheers,
Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top