Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

HOW TO COUNT TRUE VALUES IN CRYSTAL REPORT.

Posted on 2004-08-30
7
Medium Priority
?
3,419 Views
Last Modified: 2008-01-16
I have a formula set up to filter data in a column.
{tbOrders.OrderStatus}=220
It gives out me a boolean parameter true or false. What I need now is a count of positive  records(true).
In general i need to have a count of '220' record in a column grouped by another column(time).  
Can anyone help me with that ??
Pawel
0
Comment
Question by:psokolo
[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
  • 3
  • 3
7 Comments
 
LVL 28

Expert Comment

by:bdreed35
ID: 11930894
If you only want to count true values, create a formula to return a 1 or 0.

@Count_True

If {table.field} = True then
    1
else
    0

Place the field in your detail section and suppress it.
Right click the field and choose Insert, Summary.
In the box that opens up, the formula should be the field, make sure that summary type is SUM, and change the location to your Time Grouping.
0
 
LVL 10

Accepted Solution

by:
ebolek earned 500 total points
ID: 11931100
Bdreed solution will work but if you dont want ti insert summaries you can get the total count in one formula like this. I have adjusted breeds formula

Regards
Emre

@Count_True

numbervar totalcount;

If {table.field} = True then
    totalcount := totalcount +1
else
    totalcount := totalcount
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 11931170
Emre - This is true, there is mnore than one way to skin a cat.  The only difference is that your solution is only available at the end og a grouping or the report, whereas, is you need the total in the group or report headers, you will have to use the solution that I presented.
0
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 
LVL 10

Expert Comment

by:ebolek
ID: 11931204
That is true too. I only want to give him the other options like everybody else does. I think it is a good information to know that you can get the summary totals by using formulas too.

Regards
Emre
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 11931280
No problem.  For that matter, you could also create a Running Total.
0
 

Author Comment

by:psokolo
ID: 11932013
thank you very much
0
 
LVL 10

Expert Comment

by:ebolek
ID: 11933128
Glad i could help

Regards
Emre
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 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