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

Highlight Duplicative Records

Status
Not open for further replies.

JonathanNYC

IS-IT--Management
Mar 29, 2003
111
US
I don't wish to suppress duplicate records, I wish to see when they exist on a report. The duplicates are caused by me (user error) after I incorrectly enter data to our OR Scheduling System. When an error is identified, I need to then delete the duplicate record(s) from the system, because when I summarize total time allocated to a surgeon in the OR, the total time will be incorrect. Here is an example,

MDJonathan OR1 9/21/2006 8AM 7PM
MDJonathan OR2 9/22/2006 8AM 7PM
MDJonathan OR1 9/21/2006 8AM 7PM

The times above represent beginning and end times for a surgeon. In the case above 11 hours per day.

I can certainly see where the duplicates are when I view or print my report. However, I have about thirty pages worth of entries each month and I'm asking for a solution or suggestion as to whether there is a way to highlight or otherwise more conspicuously denote the duplicate line(s). I am defining duplicates as when when MDName AND Room# AND Date AND Starttime AND Endtime are all exactly the same values. In the illustration above, I would like the third line (or wherever the duplicate occurred) in bold or another font or in italics or some other distinction so that it is more clearly idenfiable when I scan the report. I'm using 10.5

Thanks in advance for any proposals you might come up with.
 
Well you'd want to make sure that the rows are grouped or sorted by those fields.

And do you want only the dupes on a report?

Here's both solutions:

Once you have the rows in the proper ordering(use Report->Record Sort Expert), right click the details and select format section, select the color tab, and select the X2 next to the color and place a formula such as:
if
(
{table.MDname} = previous({table.MdName})
and
{table.Room} = previous({table.Room})
and
...do the same with all other fields...
)
or
(
{table.MDname} = next({table.MdName})
and
{table.Room} = next({table.Room})
and
...do the same with all other fields...
)
then CRYELLOW

If you want the report to just display the dupes, then create a formula of:

// name it AllFields
{table.MDname}&"-"&{table.room}&"-"&...use all fields...

Then group this formula, and go to the Report->Edit Sselection formula->Group and place:

count({table.MDName},{@AllFields}) > 1

Now the report will only show those with more than 1.

-k
 
For the first case don't forget to do one more thing:

To say in formula:
"then CRYELLOW
else CRWHITE"
 
synapsevampire and ssakkerm, please accept my heartfelt and appreciative thanks for your excellent and incredibly timely solution. Before your note ssakkerm, I was working with the excellent solution provided by snyapsevamopire and some of the items highlighted in yelow and other items were completely in black (and unreadable). Then, I read your note ssakkerm and, well, perfect. Thank you both, very much. Your help and this site are a fantastic resource.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top