Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Unknown Message Post Reply Post New Topic
Author Message
CoachGBT
Newbie
Newbie


Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Quote CoachGBT Replybullet Topic: Unknown Message
     Posted: 29 Sep 2011 at 5:09am

I have the following formula:

IF{PTLTODO_ANNOT_ROUTE.ANNO_CATEGORY} = 'WI-PEER' AND {PTLTODO_ANNOT_ROUTE.ANNO_SUBCATEGORY} <> '11-01P' THEN COUNT({PTLTODO_ANNOT_ROUTE.PTLNO}) > 0
 
and it gives the following messge;
 
"A summary has been specified on a non-recurring field.
Details: @Non Peer"
 
Why is that?
 
Thanks,
CoachGBT
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Sep 2011 at 5:13am
youc annot do conistional counts this way.
I read this that you want a cont per row whenever on that row these 3 conditions are met:
{PTLTODO_ANNOT_ROUTE.ANNO_CATEGORY} ='WI-PEER'
AND
{PTLTODO_ANNOT_ROUTE.ANNO_SUBCATEGORY} <> '11-01P'
AND
{PTLTODO_ANNOT_ROUTE.PTLNO} > 0
 
Is that correct?
IP IP Logged
CoachGBT
Newbie
Newbie


Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Quote CoachGBT Replybullet Posted: 29 Sep 2011 at 5:18am
That is correct. And then I should be able to create a new formula to get the count, i.e;
 
COUNT({Name Formula})
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Sep 2011 at 5:34am
you can do this 3 ways.
Option 1:  a fomula field to make a 1 or 0 per row that you can SUM
if
{PTLTODO_ANNOT_ROUTE.ANNO_CATEGORY} ='WI-PEER'
AND
{PTLTODO_ANNOT_ROUTE.ANNO_SUBCATEGORY} <> '11-01P'
AND
{PTLTODO_ANNOT_ROUTE.PTLNO} > 0 then 1 else 0
Option 2: Variable formulas to conditionally couint rows - lots of examples of this int he forum
Option 3: Running Total
New running total
Name=Whatever
Field to summarize = ANNO_CATEGORY
Summary Type = Count
Evaluate=use a formula
{PTLTODO_ANNOT_ROUTE.ANNO_CATEGORY} ='WI-PEER'
AND
{PTLTODO_ANNOT_ROUTE.ANNO_SUBCATEGORY} <> '11-01P'
AND
{PTLTODO_ANNOT_ROUTE.PTLNO} > 0
Reset=never (for a grand total)
 
Both Option 2 and 3 totals have to be placed in footers, they do not work in headers
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