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.
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...
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.
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.
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