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

Sorting Data for Mailing Labels

Status
Not open for further replies.

dbew

MIS
Sep 18, 2002
49
US
This is a follow-up question regarding a mailing labels issue that was addressed here last week.

I have successfully created a Crystal report (Version 8.5) containing mailing labels for current worksite addresses. “Current” because participants, who are assigned to these worksites, can enroll in our program more than once and can be assigned to different worksites each time.

With the help of “HowardHammerman” and “synapsevampire” (THANK YOU!!!), we were able to select the current worksites for each participant by:

1. Grouping by Social Security Number
2. Adding to the Group Selection Formula Editor the following: {table.assignmentdate} = maximum({table.assignmentdate},{table.socialsecurity})
3. Suppressing the Group Header and Group Footer

As is, this solution fits perfectly! But…I’ve been asked to sort these labels in zip code (ascending) order. I cannot do this, however, because I have already grouped the report by Social Security Number.

What can I do to get these labels in zip code order??? Please help!
 
I fear that you need a two step process here, you need to dedupe and then sort, so you'll need a secondary step, which unfortunately, I can't think of a means by which Crystal can handle this.

If possible, dedupe the list in a Query on the database, and then Crystal can handle the rest.

Or if you're using CR 9, you may be able to use a subquery to accomplish the same.

-k
 
"Dedupe"? Unfortunately, I am not familiar with this term. Could you please explain?
 
The point of the grouping was to eliminate duplicates (of sorts).

But then they are not in the desired order, so you need a means to now select these rows.

A hokey solution would be to then export these rows to another data source, and then read from that data source as the source for another mailing label report...

Poor solution though, I'd fix the data prior to bringing it into CR the first time.

-k
 
Thanks synapsevampire.

You initial idea, about choosing only the records without an Assignment End Date, is worth looking into. Currently the field which houses this information is not populated. Perhaps we should expedite this task. Do you agree?
 
Just to refresh your memory, synapsevampire, this is what you initially suggested to me:

If you have a date field that shows when he left, then add something akin to the following to the record selection formula (Report->Edit Selection Formula->Record):

isnull({yourtable.yourexitdate})

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top