Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: distinctcount datetime field Post Reply Post New Topic
Author Message
spl1
Newbie
Newbie
Avatar

Joined: 18 Jun 2009
Location: United Kingdom
Online Status: Offline
Posts: 20
Quote spl1 Replybullet Topic: distinctcount datetime field
     Posted: 27 Apr 2010 at 9:40pm
Hi
I've created a report which declares a date field if a particular criteria is meet on the detail line. If no date to be declared I've used .... else DateTimeValue(0)
 
I then want to distinctcount the dates it has returned, but this includes the DateTimeValue(0)
 
Any idea's on how to suppress it in the count?

Sarah
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Apr 2010 at 3:47am
You can't. Instead use a variable formula to conditionally count ir a Running Total to count. I use RTs
Example
Name=DateCount
Field to Summarize=Datefield
Type of SUmmary=DistinctCount
Evaluate=Use a formula
Enter your if-then formula for the TRUE part only (which records to include int he count)
Reset=Never for all records.
Place in your report footer
IP IP Logged
spl1
Newbie
Newbie
Avatar

Joined: 18 Jun 2009
Location: United Kingdom
Online Status: Offline
Posts: 20
Quote spl1 Replybullet Posted: 30 Apr 2010 at 12:23am
Many thanks... it works!
Sarah
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