Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Simple Counting Formula Post Reply Post New Topic
Author Message
ClantonC
Newbie
Newbie
Avatar

Joined: 08 Feb 2014
Online Status: Offline
Posts: 19
Quote ClantonC Replybullet Topic: Simple Counting Formula
    Posted: 09 Jun 2015 at 5:16am
I know this is simple but I am still a newbie (I am however good at excuses!)

I need a record count formula. I need a count of all {Warrant.Warrant_Type} that = “WA” but that also where the {Warrant.Warrant_Disposition} = “Active”. It accepts this without error but only generates a “0” value on the report.

Does this make sense?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 09 Jun 2015 at 7:19am
So I am assuming that you are using a running total (count) and have a formula to evaluate when to evaluate.  Something like this:

{Warrant.Warrant_Type}= "WA"
and {Warrant.Warrant_Disposition} = “Active”

And this assumes that you have data that meets the criteria.
IP IP Logged
ClantonC
Newbie
Newbie
Avatar

Joined: 08 Feb 2014
Online Status: Offline
Posts: 19
Quote ClantonC Replybullet Posted: 09 Jun 2015 at 7:41am
Yes I do. We keep a list of all warrants active or complete (Still pending service and already served). I am trying to do a running count or each type of warrant separately (Arrest Warrant, Bench Warrant, and Courtesy Summons Warrant).

Until I get this worked out I am running a report that filters out all "Complete" and groups by type with a total between groups.
IP IP Logged
niha
Newbie
Newbie
Avatar

Joined: 05 Jun 2015
Online Status: Offline
Posts: 28
Quote niha Replybullet Posted: 09 Jun 2015 at 9:40pm
{Warrant.Warrant_Type}= "WA"
or {Warrant.Warrant_Disposition} = “Active”

try or instead of and
IP IP Logged
ClantonC
Newbie
Newbie
Avatar

Joined: 08 Feb 2014
Online Status: Offline
Posts: 19
Quote ClantonC Replybullet Posted: 10 Jun 2015 at 4:57am
It still gives a 0. Would that not wind up giving a count for all warrant types that are active?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 10 Jun 2015 at 7:08am
Without knowing the data and how you set up the running total (or formula) -detailed information.  It will be difficult to know what the issue is.
IP IP Logged
ClantonC
Newbie
Newbie
Avatar

Joined: 08 Feb 2014
Online Status: Offline
Posts: 19
Quote ClantonC Replybullet Posted: 10 Jun 2015 at 8:31am
Table:
     Warrants
Fields:
     Warrant Type
          AW – Arrest Warrant
          BW – Bench Warrant
          CS – Courtesy Summons Warrant

     Warrant Disposistion
          Active – (Still trying to serve)
          Complete – (either served by officer of canceled by clerk of court)

I want to put a record count of each “warrant type” that is set as “active” in the {Warrant Disposition} Field in the database.
I have a report that lists all active warrants and I have them grouped it by {Warrant Type} with a count at the end of each group. I just wanted to put a count in the report header so that I no longer needed to group the warrants by type. The report is easier for the officers to use when it is not grouped.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 10 Jun 2015 at 12:46pm
It looks like you do not equal signs but use the startswith.

{Warrant.Warrant_Type} startswith "AW"
or {Warrant.Warrant_Disposition} starswith “Active”

FYI:  I noticed that the warrant type starts with an AW not WA
IP IP Logged
ClantonC
Newbie
Newbie
Avatar

Joined: 08 Feb 2014
Online Status: Offline
Posts: 19
Quote ClantonC Replybullet Posted: 11 Jun 2015 at 4:23am
I am not sure why I didn't think to do it like that. I will give it a try! Sorry It used to be set to WA but to make it more uniformed I switched it to AW. Old habits! ;) Thank you very much for your help!

PS. So I do need to use "or" instead of "and" ?

Edited by ClantonC - 11 Jun 2015 at 4:24am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 11 Jun 2015 at 5:02am
Opps!  Probably should be an AND since you only want to count when the Type starts with WA and the Disposition starts with Active.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.