Jump to content

BIRT Developer Center
Download


DevShare Source for user-contributed BIRT articles, tips and code

Devshare Home >> Simple Real Time Report
- - - - -

Simple Real Time Report

Download Resource

Summary:

This is a very simple example of a real time report using a real time flash chart.

Full Description:

The attached example contains two files:
  • A very simple example of a real time report using a real time flash chart
  • A sample servlet that feeds the real time flash chart data.
To make this example work place the attached war in (depending on your specific installation) C:Program FilesActuate10iPortalwebapps.
The real time flash chart in the design then calls a servlet in the chart file to get data. This is done via a Flash Variable named 'dataXML'. For more information on the syntax of this variable look here: http://www.fusioncha...m/widgets/docs/
The real time flash chart expects the data in a specific format and the servlet generates random data in that specific format.


Once the war file is deployed , you can do the following:
  • Hit the servlet with no parameters: http://localhost:870...andomIntegerSet This will produce a string of three data points with a low of zero and a high of 10. Defaults for the data point count, low and high are in web.xml. You can set the defaults there and not even worry about keeping them in your URL if you like.
  • Hit the servlet with parameters: http://localhost:870...0&pointCount=10 This give you a string like this: "&label=12:00:00&value=47|27|31|29|47|24|23|44|49|23". Note it is very easy to change the data for this sample by editing the Flash Variable 'dataXML' in the report. Look for a string similar to the above URL and change the high, low, and pointCount to your needs. You might also need to change/add to the datasets section depending on your needs.
  • Use the HTML form in the web app to do some playing around/testing: http://localhost:870...DataGeneration/
  • There is another servlet for decimal numbers. The url should look like this: http://localhost:870...onMask=0.000000. Setting precisionMask to anything used by the DecimalFormat class will work. Default is to return precision of two decimal places. The URL above will return 5, like this: &label=10:49:46&value=10.770877|6.561430|7.647936

Thank you very much to Brian Hanley who built the servlets for me!


0 Comments