Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Count if with exception Post Reply Post New Topic
Author Message
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Topic: Count if with exception
     Posted: 01 Aug 2011 at 6:11am
I have a report that has a list of orders for the day and I have them grouped by hours of the day. In the report footer I want a distinct count of all orders unless they are in the time from "0000" to "0059". The database has a field that has the time listed as:
 
201108010000
YYYYMMDDHHMM
 
So I am using a formula just to take [9 to 12] for the hour and minutes. I can get the formula to work with counting distinnct records but I cant get it to exclude that first hour.
 
Thanks
KevV
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Aug 2011 at 6:20am
create a a running total
name= DC_less_First_Hour (or whatever)
field to summarize = orderid
type=distinctcount
evaluate=use a formula
tonumber(right(datetimefield,4))>59
reset=never
place in report footer
IP IP Logged
KevV
Senior Member
Senior Member


Joined: 19 May 2011
Online Status: Offline
Posts: 106
Quote KevV Replybullet Posted: 01 Aug 2011 at 10:15am
Works Perfsct. Your Awesome as usual.
 
Thanks
KevV.
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