Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Minimum value per hour for 24 hours Post Reply Post New Topic
Author Message
rups
Newbie
Newbie


Joined: 13 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote rups Replybullet Topic: Minimum value per hour for 24 hours
     Posted: 13 Nov 2009 at 3:30am
I am writing a report for Logging the Historical values in to the report for
the specified time .
I need to have the minimum / Maximum and the Average values from the database
for every hour and  for the specified 24 hours.
 
The report will be like this
 
From    To           Min          Max           Avg         Current
00:.00   01:00    19.75      20.33        20.11         20.33
01:00    02:00    19.76      20.32        20.14         20.32
.
.
.
 
This will be required for 24 hours.
 
Please note that I am getting the @startDate and @Enddate from a different programme.
 
Please let me now any workaroud for this at the earliest as I am not been able to write any formula to extract the per hour value from my database which is a process historian providing data through a .mdb file
 
Smile
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Nov 2009 at 8:30am
Group on the Time field twice, first set to "for each day" and second set to "for each hour".
Now use the MINIMUM(timefield,timefield, " by hour")
Maximum(timefield,timefield, " by hour")
Place on the GH2 or GF2
 
Now use the MINIMUM(timefield,timefield, " by day")
Maximum(timefield,timefield, " by day")
Place on the GH1 or GF1
 
 
 
IP IP Logged
rups
Newbie
Newbie


Joined: 13 Nov 2009
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote rups Replybullet Posted: 17 Nov 2009 at 2:48am
Thank you for the Reply , it worked
I am getting the desired results now!!
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