|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||


java.lang.Objectro.nextreports.engine.FluentReportRunner
public class FluentReportRunner
Utilities class to run a report using a fluent syntax
| Method Summary | |
|---|---|
FluentReportRunner |
computeCount(boolean count)
Set compute count property : default this property is false because this computation takes time |
FluentReportRunner |
connectTo(java.sql.Connection connection)
Set the connection to database |
FluentReportRunner |
connectToCsv(java.sql.Connection connection)
Set the connection to csv file |
FluentReportRunner |
formatAs(java.lang.String format)
Set the output format |
java.util.Map<java.lang.String,java.lang.Object> |
getParameterValues()
Get parameters values Values for dynamic parameters are set at runtime |
boolean |
isCancelled()
See if runner is cancelled |
FluentReportRunner |
registerListener(ro.nextreports.engine.exporter.event.ExporterEventListener listener)
Register a listener |
static FluentReportRunner |
report(Report report)
Create a FluentReportRunner object |
void |
run(java.io.OutputStream stream)
Export the current report to the specified output format |
void |
stop()
Stop the export process |
FluentReportRunner |
unregisterListener(ro.nextreports.engine.exporter.event.ExporterEventListener listener)
Unregister a listener |
FluentReportRunner |
withAlerts(java.util.List<ro.nextreports.engine.exporter.Alert> alerts)
Set an alert |
FluentReportRunner |
withChartImagePath(java.lang.String path)
Set path to folder where chart generated images will be saved |
FluentReportRunner |
withParameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
Set the parameters values |
FluentReportRunner |
withQueryTimeout(int queryTimeout)
Set the query timeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FluentReportRunner report(Report report)
report - next report object
public FluentReportRunner connectTo(java.sql.Connection connection)
connection - database connection
public FluentReportRunner connectToCsv(java.sql.Connection connection)
connection - csv file connection
public FluentReportRunner withQueryTimeout(int queryTimeout)
queryTimeout - database execution query timeout in seconds
public FluentReportRunner withParameterValues(java.util.Map<java.lang.String,java.lang.Object> parameterValues)
parameterValues - map of parameters values where the key is the parameter name
and the value is the parameter value(s)
Such parameter value can be a simple java object if the parameter has SINGLE SELECTION,
or in case of MULTIPLE SELECTION value is an array Object[] of java objects. For an empty
list of values , the value must be : new Object[]{ParameterUtil.NULL}
If we programatically add value(s) in parameterValues for a hidden parameter, the default values
for that hidden parameter will be ignored and the engine will use those from the map.
public FluentReportRunner withChartImagePath(java.lang.String path)
path - folder path
public FluentReportRunner formatAs(java.lang.String format)
format - output format : ReportRunner.PDF_FORMAT, ReportRunner.EXCEL_FROMAT
ReportRunner.HTML_FORMAT, ReportRunner.RTF_FORMAT, ReportRunner.CSV_FORMAT, ReportRunner.TSV_FROMAT
public FluentReportRunner withAlerts(java.util.List<ro.nextreports.engine.exporter.Alert> alerts)
alerts - alerts list
public FluentReportRunner computeCount(boolean count)
count - true means the count will be computed
public FluentReportRunner registerListener(ro.nextreports.engine.exporter.event.ExporterEventListener listener)
listener - exporter event listener
public FluentReportRunner unregisterListener(ro.nextreports.engine.exporter.event.ExporterEventListener listener)
listener - exporter event listener
public void run(java.io.OutputStream stream)
throws ReportRunnerException,
ro.nextreports.engine.exporter.exception.NoDataFoundException
stream - output stream to write the exported report
ReportRunnerException - if FluentReportRunner object is not correctly configured
ro.nextreports.engine.exporter.exception.NoDataFoundException - if no data is foundpublic void stop()
public boolean isCancelled()
public java.util.Map<java.lang.String,java.lang.Object> getParameterValues()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||