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

Selecting Records with No Field Variance

Status
Not open for further replies.

martinliv

MIS
Mar 16, 2007
4
US
I'm not really sure how to ask this question, so I'll give it a good shot and we'll see where it gets me.

Currently I'm selecting records from a two day date range. I need to be able to add two values from those records and only display the records that have duplicate values in the fields I choose.

For example, I would not want this set of records to print.

3/12/2007 340.45
3/13/2007 205.78

But I would if the data was like this:

3/12/2007 340.45
3/13/2007 340.45

There will eventually be 4 or 5 fields and if any of them are the same in the record for two consecutive days then it should flag to display.

I'm using CR XI.

Thanks for your help,

Martin
 
Group by date + field, maybe converted to text values.

Do a count on each group.

Use Group Selection to show only groups where the count is 2 or more.

You can also suppress the detail lines and just show the value in the group header or footer.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks for your quick response and assistance!

I'm not exactly sure how to create a group with two fields combined.

I see a problem that when I add three more fields to this report to compare with each other, the Date + Field group will no longer be helpful. For the most part, the field combined with the date will change. However, it's the other fields that I'm comparing that have a better chance to not change.

The bottom-line is that we are trying to catch people that don't put in new information each day and simply put in what was in the previous day.
 
Sorry I misunderstood, yes, that method will not get what you want.

If it's comparing today to yesterday, then do a suppression for most of the detail lines. Right-click on the field and choose Format Field. Choose the [Common] tab, and then the formula icon (x+2 and a pencil) for suppression. Enter a formula;
Code:
{your.field} <> Previous({your.field})
If you grouped by person, this should get what you want.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top