Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Discard/Suppress a record on a report Post Reply Post New Topic
Author Message
DoctorDave
Newbie
Newbie
Avatar

Joined: 07 Apr 2016
Online Status: Offline
Posts: 3
Quote DoctorDave Replybullet Topic: Discard/Suppress a record on a report
    Posted: 12 Apr 2016 at 1:51pm
Hope someone out there can help with this question. I'm a newbie to Crystal Reports so please bear with me.

I'm trying to modify an existing report to ignore a record if the date/time stored on the record is within 5 minutes of that on the previous one. I've got all the datediff math working fine, but can't figure out how to suppress the line when the condition is met. I'm using CR XI, btw.

Any suggestions?

Thanks.
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 12 Apr 2016 at 11:07pm
Assuming that your records are in detail section, go to Report --> Section Expert --> Click Details --> Click on the icon to the right of "Suppress (No Drill-Down)". Type the condition. Will be something like (Crystal syntax):
Datediff("n", Previous({Table.Field}), {Table.Field}) <= 5
Save it. That should work...
IP IP Logged
DoctorDave
Newbie
Newbie
Avatar

Joined: 07 Apr 2016
Online Status: Offline
Posts: 3
Quote DoctorDave Replybullet Posted: 15 Apr 2016 at 9:31am
Thanks, Valert. I'm almost there, I think. Let me give a little more detail.

I already have the date math in a formula, because I need to check some other conditions, like client and staff names (the same client can be served by multiple staff), as well. All that logic works fine. I declared a global Boolean variable in the formula and set it to true or false, based on the calculations. I'm trying to reference that variable in the suppression criteria and get the ever-wonderful "The remaining text does not appear to be part of the formula" error.

Edited by DoctorDave - 15 Apr 2016 at 9:33am
IP IP Logged
DoctorDave
Newbie
Newbie
Avatar

Joined: 07 Apr 2016
Online Status: Offline
Posts: 3
Quote DoctorDave Replybullet Posted: 15 Apr 2016 at 10:03am
Actually, ignore my previous reply. I just picked up all the code and dropped it into the section and it's working like a champ. As I said, I'm new to this.

Thanks, again, for your help
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.