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!

Hide Duplicates Conditionally 1

Status
Not open for further replies.

jdegeorge

Programmer
Mar 19, 2002
1,313
US
Hi

I have a report with a series of fields that I want to hide if they repeat in subsequent records. I'm using the HIDE DUPLICATES property on these fields and they're hiding, but not as desired.

I only want all 5 to hide if a particular field duplicates in subsequent records. Is there any way to add a condition to this property? The options are YES/NO.

Thanks!

Jim DeGeorge [wavey]
 
You could create an expression combining all of the fields, then sort/group by that field, hiding dups. You never need to include the field on the report.

traingamer
 
Traingamer

How will hiding that expression hide the individual fields?

Jim DeGeorge [wavey]
 
Sorry, Jim.
I thought you wanted to hide the fields if ALL 5 matched - I misread your problem.
Let me see if I have this right:
You have 5 fields you want to hide only if the value in SOME OTHER FIELD repeats?


traingamer
 
Close. I have 5 fields, 1 through 5. I want to hide all if #1 repeats.

Jim DeGeorge [wavey]
 
Code:
select fld1, first(fld2), first(fld3)....
from file
where....
group by fld1

might work. But how do you know which fld2, fld3, etc. you want to display?

traingamer
 
Traingamer

If fld1 repeats, the other four will also be guaranteed repeats.

This sounds like record source code. I don't want to change my record source, I just want to hide repeating information.

Maybe I need to make this more clear and I'll reduce the number of fields. These are the fields:

Item_#, OpenDate, Status, StatusDate.

Status and StatusDate are stored in a related table linked by Item_#. This is the report I have now:

Item # Open Date Status Status Date
------ --------- ------ -----------
1 01/01/2005 Open 01/01/2005
1 01/01/2005 Pending 02/04/2005
1 01/01/2005 Closed 02/11/2005
2 02/01/2005 Open 01/01/2005

This is what I want to see:

Item # Open Date Status Status Date
------ --------- ------ -----------
1 01/01/2005 Open 01/01/2005
Pending 02/04/2005
Closed 02/11/2005
2 02/01/2005 Open 01/01/2005

Can this be done?

Jim DeGeorge [wavey]
 
In your report setup, group by Item and group by status, and choose a 'stepped' report in the wizard. Adapt as needed.

traingamer
 
Traingamer

That solution hides the necessary fields, but it splits the record into 2 lines.

However, it's the best that we're going to get, so enjoy the star! Thanks!

Jim DeGeorge [wavey]
 
If by two lines you mean the Item and the status, drag the Item text box to the status section and close the Item section on the report.

(Or drag both boxes from the header sections to the detail sections and close both header sections, or ... or...)

traingamer
 
Sorry, since you have multiple detail rows:
DON'T drag BOTH boxes from the header sections to the detail sections and close both header sections

traingamer
 
That's what I did. I put all fields that I didn't want to repeat in the Item/Status header section and left the one field that kept changing from record to record in the detail section. It looks something like this:

Item Date Status Owner Update
---- ---- ------ ----- ------
100 02/05 Open Jim
1 - New Item
2 - Updated Item
3 - Closed Item

It'll have to do.

Jim DeGeorge [wavey]
 
Don't understand your last post. Sorry.

Jim DeGeorge [wavey]
 
Never mind. After I thought about it, I realized you had already done what I was trying to suggest.



traingamer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top