troubleshooting Question

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

Avatar of peterseychelles
peterseychelles asked on
Crystal ReportsVisual Basic Classic
5 Comments1 Solution747 ViewsLast Modified:
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;

for({OrderRel.OpenRelease}.length){

    if (current record = true)
            open++
}
    if (open > 0){
       suppress;
    }
ASKER CERTIFIED SOLUTION
GJParker

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros