on 04-23-2007 6:39 PM
Post Author: MTrusing
CA Forum: General
I am trying to compare returned values in my report so that I can identify duplicate records in our database. I have used the PreviousValue function before, but I don't believe that is what I need here. I'm wanting to compare each row in my report to the previous and next rows that are returned. Can anyone shed some light on this for me?
Post Author: MTrusing
CA Forum: General
Next and Previous duplicates are now being highlighted. Interestingly enough though, in some cases, there are more than two consecutive duplicate records. I don't know of a function that will look before the Previous record and/or after the Next record.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Charliy
CA Forum: General
To highlight both of the duplicates, you need:
IF {table.field} = NEXT({table.field}) OR {table.field} = PREVIOUS({table.field}) ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: MTrusing
CA Forum: General
Thank you. I will try that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: MTrusing
CA Forum: General
Thank you so much for your help. I had been going to that area of the Section Expert, but did not know the correct functions to use. Applying that function highlights the duplicate record. (I am trying to identify all records with duplicate addresses.) Is there also a way to highlight both records that are the same? Right now it is highlighting a second record if it matches the one before it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Jagan
CA Forum: General
What constitutes a duplicate record? Can you group on something such that you'd only expect one detail record per group, and then use the count function to check if there's >1 in the group and colour accordingly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Charliy
CA Forum: General
Within the section formatter find the area for Background Color and click on the formula box.
Enter the formula: IF {table.field} = PREVIOUS({table.field}) then crYellow else NoColor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: MTrusing
CA Forum: General
I am actually attempting to apply conditional formatting (shading all rows where a duplicate value exists). I have gone into Section Expert, and want to apply the formatting to the Detail section. Once I am in the Detail section of the Section Expert, where do I actually enter the formula to compare current field to previous values? When I type If {table.field} = Previous({table.field}), Crystal is looking for the formula result to either be a number, or it tells me it is looking for a "then".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Charliy
CA Forum: General
If you're using it for print suppression, then you need to go to the Section Expert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: MTrusing
CA Forum: General
Thank you for responding. So I do need the Previous command after all. Should this formula be done within the Section Expert?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Charliy
CA Forum: General
If {table.field} = Previous({table.field}) ...
or you could use next
If you're using it for suppression, put Not(onfirstrecord) in the formula before the other comparisons.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: MTrusing
CA Forum: General
I am using Crystal 9 (Professional)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: colin mackenzie
CA Forum: General
What version of Crystal Reports Developer are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.