I have fault data in a database in the form of:
faultid | faultcode | startdatetime | enddatetime
Although the devices are polled every few seconds the entries in the database are only updated when the state of the device changes and so I might get a fault that lasts for minutes, hours or even days.
I want to chart the fault time as minutes against time in intervals, e.g. 30 min, 1 hr, 1 day intervals; such that a fault lasting several intervals will grow width-ways in the chart over time rather than just as a huge singular bar at the startdatetime. I would like to do this in a platform independent way if possible.
The charts-reports are run and viewed on demand from a Java application.
I tried googling for similar problems/solutions but either I'm googling the wrong stuff or not many people do this sort of thing or its more obviously done some way that I'm not getting -- am I going about it all wrong?
Things Tried:
I use BIRT for reporting, it alone does not seem capable to massage the data into the form I need for the chart I need unless I were to get knee-deep into BIRT script -- however the documentation and resources thus far have not been sufficient to allow me to even get close to doing this - any ideas?
I considered using BIRT's connection afterOpen script to perform custom SQL operations first but again the lack of usable documentation and resource made it seem impossible to do here.
In one instance I used a SQL Server stored procedure to produce the fill-in data, creating interval data where the enddatetime - startdatetime > interval. This procedure was called every time the report was called. This worked well but I would need to maintain a stored procedure for each of the different databases / reports I use and feel that there must be a better way.
We use Pentaho Kettle for data archiving, I tried using that to perform the data filling, however it seemed impossible to get Kettle to generate such data - any ideas?
I have considered generating the fill-in data from the Java application but that means that the application would need to know too much about the report in order to run it -- I want better abstraction that that so UI developer and report designers are totally separated.
Thanks.