Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Rookie Count problem Post Reply Post New Topic
Author Message
bigbloo
Newbie
Newbie
Avatar

Joined: 09 Mar 2010
Location: Canada
Online Status: Offline
Posts: 19
Quote bigbloo Replybullet Topic: Rookie Count problem
    Posted: 18 Mar 2010 at 8:08am
I need to count the qty of one field with a simple condition -
the formula editor doesn't like my count query:
Count ({Table_A.Field_1})
Where  {Table_A_.Field_2}is "1"
 
it tells me:
 
The remaining text does not appear to be part of the formula.
And the entire second line is highlighted.
 
WHat am I doing wrong? And whats the purpose of the round brackets?
Bigbloo
--------------------------------------------------
Information is power only when it's shared.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Mar 2010 at 8:52am
Sorru but crystal won't let you use a where clause like that.
 
You can do this in a few ways.
1. Varaible field that conditianlly counts (not my cup o' tea but there are a ton of explanations on how to do that.
2. If you do not have dupes create a  if-then formula to return 0 / 1 and then SUM that. although I think you might want a distinctCount here.
3. Create a Running Total and use a formula for the evaluate section.
Sample.
name='NomRookieCounter'
field to evaluate={Table_A.Field_1}
Type of evaluation=Count (maybe you want a DistinctCOunt though?)
Evaluate = Use a formula
insert your condition here
{Table_A_.Field_2}="1"
Reset=Never (for a grand total in the report)
Place in Report footer for total or in details to watch an incrimental change.
Running Totals do not work in headers
 
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.