Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Tips and Tricks
Message Icon Topic: Using count on multiple conditions Post Reply Post New Topic
Author Message
Justus
Newbie
Newbie


Joined: 04 Sep 2012
Location: United States
Online Status: Offline
Posts: 1
Quote Justus Replybullet Topic: Using count on multiple conditions
    Posted: 04 Sep 2012 at 5:36am
Hi,
 
I think/hope this is a simple question. Smile
 
In my report I use a table that contains the following fields:
- Companies.SalesManager
- Companies.UniquedID
- Companies.StateChange
- Companies.State
 
What I am trying to do is to make an overview per sales Manager of the companies he/she is responsible for that:
1- have the State 'contacted'
2- have a StateChange that is in last 30 days
 
What I started to do is just group by sales Manager, but then I got lost as the count function does not seem to allow for multiple arguments.
 
Help on this would be greatly appreciated!
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 04 Sep 2012 at 8:44am
use running totals, they are pretty self explanatory and easy to use.

Otherwise shared variables would work.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 05 Sep 2012 at 4:09am
Or you could do something like this:
 
If {Companies.State} = 'Contacted' or {Companies.StateChange} >= CurrentDate - 30 then 1 else 0
 
You would then SUM this formula to get the count you're looking for.
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.016 seconds.