Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Analyse LogFiles Post Reply Post New Topic
Author Message
CR11_User
Newbie
Newbie


Joined: 17 Mar 2009
Online Status: Offline
Posts: 2
Quote CR11_User Replybullet Topic: Analyse LogFiles
    Posted: 17 Mar 2009 at 2:13am
Hi,

I am new to this forum as well as I am new to Crystal Reports (I am using Version 11) and currently I'm working on a report which analyses a LogFile - Data Base (Access DB).

The data structure in the data base is something similar to this:

id   date_time                  status     device
01   17.03.2009 03:00:00 down       192.168.0.1
02   17.03.2009 03:00:10 down       192.168.0.2
03   17.03.2009 04:01:00 up           192.168.0.2
04   17.03.2009 04:02:00 down       192.168.0.3
05   17.03.2009 04:04:00 up           192.168.0.1
06   17.03.2009 06:00:00 up           192.168.0.3
07   17.03.2009 07:00:30 down       192.168.0.4
08   17.03.2009 07:01:00 down       192.168.0.1
...

So basically it is about up- and down status for different devices in a network where I want to create a monthwise overview about outages.

In my report I want to see all outages grouped together per device. For example like this:


Device
192.168.0.1

Outage 1:
     17.03.2009 03:00:00 - 17.03.2009 04:04:00
     Duration: 1:01:00
Outage 2:
     17.03.2009 07:01:00 - .....
     Duration: ......



Device
192.168.0.2

Outage 1:
     .........


In Access I have created an SQL query which filters out all "down" events and list these in my Report. But I have no clue how to find the corresponding "up" events in order to calculate the down-time etc.

Am I on the completely wrong track here ? I appreciate any of your help very much :-)

Best Regards,
andy
IP IP Logged
CR11_User
Newbie
Newbie


Joined: 17 Mar 2009
Online Status: Offline
Posts: 2
Quote CR11_User Replybullet Posted: 17 Mar 2009 at 6:53am
Is that really impossible with Crystal Reports (11) ?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Mar 2009 at 7:09am

You may have to tweak this but this might get you started.

Group on Device
Record Sort on date time (or id since it looks to be the same)
Create a formula to get your difference in time in minutes and place on detail:
if previous({table.status})="Down" then
datediff("n",{table.datetime},previous({table.datetime}))
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.031 seconds.