Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Distinctcount transactions by time Post Reply Post New Topic
Author Message
mostrador
Newbie
Newbie


Joined: 20 Jul 2010
Online Status: Offline
Posts: 8
Quote mostrador Replybullet Topic: Distinctcount transactions by time
     Posted: 20 Jul 2010 at 1:53pm
I'm fairly new with Crystal and have been trying to get this to work for a while. I need help!
 
I'm trying to get a distinct count of transactions but only for a certain static time range.
I have a formula for the time range:
{Transaction.Time}in cDateTime("6:00 am") to cDateTime("3:59 pm")
 
I'm trying an Insert Summary for the {transaction.transactionnumber} field, doing a distinct count of those, and don't know what to do next.
 
I've tried so many different things and have run out of options.
 
IP IP Logged
LShadrin
Newbie
Newbie


Joined: 20 Jul 2010
Location: United States
Online Status: Offline
Posts: 24
Quote LShadrin Replybullet Posted: 20 Jul 2010 at 2:13pm
HI,
I am new at this too but finally figured this out myself.
 
Not sure if it will help but do a selection expert for Transaction.Time, and select the "In between" field and enter your date and time range there.
Luka
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Jul 2010 at 2:26pm
or use a Runnning Total
Name=Whatever
Field=transactionnumber
tupe of summary=distinctCount
Evaluate=use a formula
put your time fomrual here
reset=never
place in report footer
IP IP Logged
mostrador
Newbie
Newbie


Joined: 20 Jul 2010
Online Status: Offline
Posts: 8
Quote mostrador Replybullet Posted: 21 Jul 2010 at 6:45am
Thanks!
The running total solution makes sense to me but it's bringing up zero.
Does my {Transaction.Time}in cDateTime("6:00 am") to cDateTime("3:59 pm") seem valid?
Any time I try to alter the formula, it says I need to have a date value. I don't want that included in the formula because I need the user to be able to change that in the report filter. The time range will always stay the same.
Thanks in advance!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 21 Jul 2010 at 6:59am
try
time({Transaction.Time}) in Time(6,0,0) to Time(15,59,0)
IP IP Logged
mostrador
Newbie
Newbie


Joined: 20 Jul 2010
Online Status: Offline
Posts: 8
Quote mostrador Replybullet Posted: 21 Jul 2010 at 9:35am
I am beyond excited. Thank you!
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