We help IT Professionals succeed at work.

Counting true/false field in Header section of a Crystal sub report

Last Modified: 2012-02-09
I'm trying to work out if there are any open releases on an order in the header section of a sub-report so that I can determine if I need to suppress the header section or not.

If all of the records in {OrderRel.OpenRelease} is equal to false then I can suppress the header section.  I guess it might be possible to do this by having a global variable incremented on the detail section when I display the records, but I would rather not have to do this.

I thought perhaps I could use the count function in Crystal like this, but my syntax is incorrect somewhere.

Suppress header section: count(IIF([{OrderRel.OpenRelease}]=true, 1, 0))  > 0

I also suppose I could do something like the following, but I've no idea what the syntax would be for this in VB or crystal.

int open = 0;


    if (current record = true)
    if (open > 0){
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)


That will do it, the count if function is that not worth using or something?


Would have been nice to see an example on how to use the count if function with a database field.

Crystal Reports up to version XIR2 doesn't have a CountIf function, don't know if this has been introduced in recent vesrions.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

As far as I know, Crystal doesn't have a COUNTIF summary function.


Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.