net.sf.jzeno.echo
Class ReportManager

java.lang.Object
  extended by net.sf.jzeno.echo.ReportManager

public class ReportManager
extends java.lang.Object

Manager that takes care of generating reports (using jasperreports and birt). Provides a simple way of generating a report and streaming it to the user's browser (in a new window).


Field Summary
static int HTML
           
static int PDF
           
static int RTF
           
static int XLS
           
static int XML
           
 
Constructor Summary
ReportManager()
           
 
Method Summary
static void generateReport(java.lang.String reportName, net.sf.jasperreports.engine.JRDataSource dataSource, java.util.Map parameters, int outputFormat, java.lang.String fileName)
          Generates a report in the specified outputFormat and displays it to the user in a newly created browser window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDF

public static final int PDF
See Also:
Constant Field Values

XLS

public static final int XLS
See Also:
Constant Field Values

RTF

public static final int RTF
See Also:
Constant Field Values

XML

public static final int XML
See Also:
Constant Field Values

HTML

public static final int HTML
See Also:
Constant Field Values
Constructor Detail

ReportManager

public ReportManager()
Method Detail

generateReport

public static void generateReport(java.lang.String reportName,
                                  net.sf.jasperreports.engine.JRDataSource dataSource,
                                  java.util.Map parameters,
                                  int outputFormat,
                                  java.lang.String fileName)
Generates a report in the specified outputFormat and displays it to the user in a newly created browser window.

Parameters:
reportName - the name of the report, eg: "/net/sf/jzeno/jasper/example.jasper"
dataSource - the datasource that will feed the report with data
parameters - any additional parameters you use in the report
outputFormat - PDF, HTML, XLS, RTF or XML
fileName - the name the file will have as a download, without any extension (added according to outputFormat)