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!

Suppress if immediately preceding record is the same. 1

Status
Not open for further replies.

mgason

Technical User
Feb 6, 2003
158
AU
Hi,
can I suppress a record if the one immediately before it is a duplicate.

here is a simple version of how my data might look in the database...

Recipe description batch time
A some recipe A-1 12:45pm
A some recipe A-2 12:46pm
A some recipe A-3 12:47pm
B another recipe B-1 12:48pm
B another recipe B-2 12:49pm
A some recipe A-4 12:50pm
A some recipe A-5 12:51pm
A some recipe A-6 12:52pm

I would want it to appear like this in the report. All ordered by time. I can not Group by Recipe because I need the time to stay in order. The Recipe and description should appear again if some other recipe has broken up the sequence.

A some recipe
A-1 12:45pm
A-2 12:46pm
A-3 12:47pm
B another recipe
B-1 12:48pm
B-2 12:49pm
A some recipe
A-4 12:50pm
A-5 12:51pm
A-6 12:52pm

Well maybe I can group, I am not sure, any advice on how to achieve this appreciated immensely

Mark
 
Hi,
try Grouping by Time then by Recipe

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You could place the first two fields in a detail_a section and format each field to "suppress if duplicated" (format field->common tab). Then go into the section expert and format detail_a to "suppress blank section".

-LB
 
Thanks,
I decided on the lbass solution, mainly because my brain was heading that way already.
I was under the wrong impression that 'suppress if duplicated" would suppress ALL A's after the first.

Now I have another problem though which I failed to include in my first post.
Recipe A could have several revisions, 1, 2, 3.
Thus I need the recipe field suppressed if both it and revision are duplicated.
Plus now I can't just suppress revision if duplicated because I might have this which would suppress rev on the B recipe
Recipe Rev
A 1
A 1
B 1
A 2
A 2
A 1

result for the a details section should be

A 1
B 1
A 2
A 1
 
Concatenate the two fields in a formula {@concat} like this:

{table.recipe}+ totext({table.revision})

Then select the two actual fields in the detail section->format field->common tab->suppress if duplicated (do not check this)->x+2 and enter:

{@concat} = previous({@concat})

-LB

 
LB -

This thread is helping me with a question i had, using your below recomendation:

You could place the first two fields in a detail_a section and format each field to "suppress if duplicated" (format field->common tab). Then go into the section expert and format detail_a to "suppress blank section".

This looks to work as needed, but when I'm exporting my data into excel the blank rows are showing back up. Anything i can do stop this?
 
Nevermind, finally figured it out.

Went to Options - Suppress Printing if No Records Selected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top