Solved

Trying to conditionally count a field and produce the total in the Page header.

Posted on 2013-11-28
3
990 Views
Last Modified: 2013-11-28
I'm looking to run a count on a field {HazItem} which returns either true or false.  The count should be based on if the field value is true.  This total should be accessible in the page header.  I can get it to work correctly in the footer sections, but not in the header.  The problem is the value of this formula is needed in order to feed logic in another condition on the page header.  I know that the documents execution order is what's causing this problem, but surely there must be a workaround.

I've tried adding a formula in the details section:

if ({HazItem}=true) then {HazItem}

And then in another formula ran a count against it:

count({formula}) / count({formula}, {GROUP})
0
Comment
Question by:peterseychelles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39683607
Try this way

if ({HazItem}=true) then 1

Now use SUM instead of COUNT

sum({formula}) / sum({formula}, {GROUP})

mlmcc
0
 

Author Closing Comment

by:peterseychelles
ID: 39683692
God, I can't believe I didn't think of that, I was so fixated on using the count function I hadn't considered doing it like that.  That does the trick, thanks mlmcc.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39683942
Count just counts records so if you are trying to filter the rcords to count only some of them then you need to use a trick like that.  Count doesn't look at the value just that there is a recod.

mlmcc
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question