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

Sort before Suppression

Status
Not open for further replies.

adamsjw2

IS-IT--Management
Nov 26, 2002
3
US
I need to sort my data in my report before the suppression formula takes care of duplicate entries. Is this possible and if so when and how? From what I've read, sorting takes place in the "WhilePrintingRecords" pass and therefore "WhileReadingRecords" won't help. Is there syntax to put at the beginning of my suppression formula?
TIA,
Jim Adams
Maysville KY USA
 
I think that you should handle this in a View or Stored Procedure to assure this, and while you're at it, you may as well filter out the suppressed rows.

If this isn't a possibility, I think that sorting will do what you want, unless you mean by suppression that you're using a record selection formula.

An example is:
Data:
First Last Age
John Smith 40
John Smith 30

Sort on:
Last
First
Age

Result

John Smith 30
John Smith 40

To not worry over suppression, group on these field, and place the fields to display in the Age row, and only the first will display.

Hope this helps, and have a great T-Daze.

-k kai@informeddatadecisions.com
 
K,
Thanks for your quick reply. The sorting will probably have to take place in a View, unless I can force Crystal to sort before my suppression formula, which is in the details section of my report.
My suppression formula is
if {client_id)=previous({client_id})and {date_service}=previous(date_service)and {service_code}=previous ({service_code})then 0
else {units_service}

My report defaults to sorting on {client_id} and {service_code}. What I need to make the above formula to work correctly is to have it sort 1st on {client_id} and 2nd on {date_service}.

TIA,
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top