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

SUPPRESS DUPLICATE NAMES

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
I have a Crystal report with 700,000 records. I grouped this by fields "PROCESS" and "OPERATION".

Under the Grouped Operation field there are many duplicate numbers such as 10 or 20.

I want to suppress the duplicate numbers and only show each distinct number once for each Grouped Process & Operation. Example:

Process Operation
LEFC710 10
LEFC710 10

Process Operation
LEFC730 10
LEFC730 10
LEFC730 20
LEFC730 20
LEFC730 30
LEFC730 30

In this example I would like to see only:
LEFC710 10 one time

LEFC730 10 ONE TIME
LEFC730 20 ONE TIME
LEFC730 30 ONE TIME

I used the below formula under the Insert Section Suppress:
{PROCESSES & OPERATIONS.OPERATION_}=NEXT({PROCESSES & OPERATIONS.OPERATION_})

This workS fine except if there was only one distinct number such as the example above (LEFC710)it did not show the number 10 at all under the Grouped Process and Operation. If under the groups there is only one number for the operation it will not even show that one number. If there is more than one distinct nubmer (LEFC730) it will show each distince number in the Operations column correctly.

I hope someone can help and that this makes sense.
 
2 things you can try

database menu -> select distinct records

if that doesn't work

place the Process field and the operation field in the group 2 header section and suppress the detail section.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
You'd probably be best served to eliminate the dupes from the returned rows, rather than coding around them in the report.

To do so, you'll need to learn a bit about your environment, such as:

Crystal version
Database/connectivity used

If these are the only two fields used in the report, then the Database->Select Distinct Records will work (Crystal version dependent).

You can also pass grouping information to the database and make only the required rows come back if it's properly desgned and you use Gary's second suggestion for design.

If you're using a database that supports SQL, you could use a Command object and paste in the SQL to return only what you need.

Something like:

select Process, Operation from table
group by Process, Operation

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top