Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Suppress section formula Post Reply Post New Topic
Author Message
crystalnewbie33
Newbie
Newbie


Joined: 08 Jan 2014
Online Status: Offline
Posts: 29
Quote crystalnewbie33 Replybullet Topic: Suppress section formula
    Posted: 17 Aug 2016 at 9:08am
Hello, I'm trying to suppress the page footer of a report if {table.species} in the details section does not equal "SHEEP". The problem I am having is that I only want it suppressed if NONE of the records equals "SHEEP." Here is my current formula (Basic Syntax):
If {InvD.Species}="SHEEP" Then
   formula = false
Else
   formula = true
End If

If ANY of the records contains something other than "SHEEP", the section is suppressed. I only want it suppressed if "SHEEP" is nowhere to be found. There must be a simple operator or something that I'm not finding. Thanks for the help.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 17 Aug 2016 at 9:53am
At the detail level have the following formula.

shared booleanvar suppress;
if {InvD.Species}<>"SHEEP" Then
suppress = True

In the the page footer suppress formula, put
shared booleanvar suppress;
suppress

Now if their are multiple pages to the report, then you will need another formula in the page header
shared booleanvar suppress := False;

You don't have to booleanvar, but it is simplest data type to use.
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.017 seconds.