cancel
Showing results for 
Search instead for 
Did you mean: 

Display only one record in Crystal Reports

Former Member
0 Kudos

Hello,

I am trying to display only one record that meet certain criteria (the same date, the same type but different color) but I am getting an error.

For example, two Hondas cars (the same type) were sold on the same date but I need to be able to display only row for Red color:

DATE………………………….CAR TYPE……………………COLOR

20/07/2017………………..HONDA………………………..WHITE

20/07/2017…………………..HONDA……………………….RED

I need to be able to see only

20/07/2017…………………..HONDA…………………….RED

Thanks a lot

Accepted Solutions (0)

Answers (2)

Answers (2)

abhilash_kumar
Active Contributor
0 Kudos

Hi Alisia,

1. Create a formula called @group with this code:

{Date field} & {Car Type Field}

2. Insert a Group on this formula field

3. Place the Date and Car Type fields on the Group Header/Footer

4. Create a formula called @Color with this code:

If {Color Field} = 'RED' then 'RED'

5. Go to the Insert Summary Option > Insert a Summary on the @Color formula > Choose 'Maximum' as the sum function and place this summary field on the Group Header or Footer beside the other fields.

Do note that this will only show the color when a row has a RED car.

If for e.g. on a particular day only one White car was sold, the field will show blank as it's only looking for Red cars.

-Abhilash

Former Member
0 Kudos

Thank you Abhilash very much for your help on this. I need to be able to see white or other car colors if they were sold on the other days and other care type if they were sold on the same date . I just need to display Red if this is the same date and type. Also, I need to summarize this data in crosstab. I hope this is possible. Please let me know if additional clarification is required. Thanks again!

Former Member
0 Kudos

Group data on Date and Car Type

Suppress Group Headers, details and date group footer.

Move fields to Car type footer

Ian