Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count of Characters from different Fields Post Reply Post New Topic
Author Message
Fareena
Newbie
Newbie


Joined: 31 Aug 2012
Online Status: Offline
Posts: 1
Quote Fareena Replybullet Topic: Count of Characters from different Fields
     Posted: 31 Aug 2012 at 12:58am

     I am trying to get a count of the number of P's from different fields. For Example I want to count number of candidates present from table(where P=present). I am not sure of the best way to achieve this.
 
If someone could help, I would be greatly appreciative.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 31 Aug 2012 at 3:52am
Is the "P" a single character in a separate field or is it part of one of your data fields?
 
If it's in a separate field, you could use something like this:
 
If {table.PField} = 'P' then 1 else 0
 
If it's the first letter in a longer string, you could use this:
 
If Left({table.PField}, 1) = 'P' then 1 else 0
 
For either of these, you would sum the formula to get your count.
 
-Dell
IP IP Logged
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