Print Page | Close Window

Analyse LogFiles

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5799
Printed Date: 07 May 2024 at 5:26am


Topic: Analyse LogFiles
Posted By: CR11_User
Subject: Analyse LogFiles
Date 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



Replies:
Posted By: CR11_User
Date Posted: 17 Mar 2009 at 6:53am
Is that really impossible with Crystal Reports (11) ?



Posted By: DBlank
Date 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}))



Print Page | Close Window