×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# suppressing the second record that matches the formula criteria

## suppressing the second record that matches the formula criteria

(OP)
I have been struggling with this report for days and found this site, useful for most of my problems with it but I can't seem to find the right solution to fix the final piece of it.

I have 4 groups
experiment
experiment group name
experiment subject ID
Day

I have the following in the footer of my Day and these work great: Day, result of the test for that day
Day 1 = 0
Day 2 = 0.5
Day 3 = 0.5
Day 4 = 2

I have used a running total to get the minimum value and created a formula
If ({table.results} = {#min})
then
{day}
else
0

and placed a suppress on if {@day} = 0

this works great but in the instance where I have 2 values that are the minimum the report is now giving me both days 2 and 3 when I only want to see day 2.

Any suggestions are greatly appreciated.

thanks
J

### RE: suppressing the second record that matches the formula criteria

(OP)
sorry Crystal version XI

And the I don't want to see 0 as the minimum value, thus I would like to have a field return day 2 only the the other fields suppressed(including day 3 where the values are the same) and this value will be placed either in the footer of either the experiment subject ID or Day

I have tried using the {table.results} = previous({table.results} ) and this, nor the Next function do not work

### RE: suppressing the second record that matches the formula criteria

I'm not sure why using the previous and next functions would not work in this situation.
Have you tried creating a separate formula to mark the records that you don't want to keep.

#### CODE -->

{table.results} = previous({table.results} and {table.subjID} = previous({table.subjID}) then 'Suppress'
{@day} = 0 or {@newformula)= 'Suppress'

Gordon
Crystalize

### RE: suppressing the second record that matches the formula criteria

(OP)
I tried this and no luck. It seems to not recognize this at all because it is leaving it completely empty. When I add an else 'stuff' it returns this bypassing the 'Suppress'.

I have attached a couple of screenshots to help clarify what is going on.

Thanks for the assistence

J

### RE: suppressing the second record that matches the formula criteria

Previous functions work on the detail record and if the day group has multiple records then this would explain the results.
So we can use a variable instead.
Create a formula placed in the SubjectId Group Header.

#### CODE -->

WhileprintingRecords;
BooleanVar Result := false; 
Create a formula and place it in the day Group;

#### CODE -->

WhilePrintingRecords;
BooleanVar Result;
StringVar Display;
if Result = false then Display := {@Days} else Display := '';
if {@day}<>0 then Result = true;
Display 

I haven't tested but something along these lines may work

Gordon
Crystalize

### RE: suppressing the second record that matches the formula criteria

(OP)
I tried this a few different ways and I am still getting the same answer. Any other suggestions?

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!