Solved

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

Posted on 2013-11-28
3
981 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 100

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 100

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

735 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