Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: how to filter time in a report Post Reply Post New Topic
Author Message
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Topic: how to filter time in a report
    Posted: 28 Jan 2014 at 2:45pm
Hi guys,

I am creating a report that will show all the details based on a specific problem and specific time.

Example:
all related problems regarding "Printer". with a time frame of 0700H to 0100H Every week / month.

if I have the following data

Subject        Reported_Time
Printer...     1/1/2014 7:00AM
Printer...     1/1/2014 7:52AM
Printer...     1/2/2014 2:00AM

is it possible to display only the the first 2 rows?

Thanks in advance.
IP IP Logged
lolly54
Groupie
Groupie
Avatar

Joined: 25 Sep 2011
Online Status: Offline
Posts: 58
Quote lolly54 Replybullet Posted: 28 Jan 2014 at 9:47pm
You can use the Time function.

In the record selection section, use the following codes
{Subject} = "Printer" and
Time({Reported_Time}) in Time("07:00:00") to Time("01:00:00")


As I am not sure how your Subject data is like, here's other suggestion...
{Subject} startswith "Printer"
or
{Subject} like "*Printer*"

That should filter the records for you.

IP IP Logged
NewCRuser
Newbie
Newbie


Joined: 28 Jan 2014
Online Status: Offline
Posts: 7
Quote NewCRuser Replybullet Posted: 28 Jan 2014 at 10:43pm
Thanks lolly54 for the reply. It works. I just added OR operator.
What I did is this. I created a formula -
if time({Command.CreationTime}) in time("07:00AM") to time ("11:59PM") or
time({Command.CreationTime}) in time("12:00AM") to time ("1:00PM") then
true
else false.

Is it okay if you could also answer my other thread regarding "Minimum and maximum value?" Thanks again.
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.033 seconds.