public class EngineBundle extends java.lang.Object implements ReportGenerator
Constructor and Description |
---|
EngineBundle(java.lang.String format)
Create a new bundle of reports for the specified output format.
|
Modifier and Type | Method and Description |
---|---|
Engine |
addReportFile(java.lang.String reportUrl)
Add a new report template to this bundle and creates an engine.
|
void |
execute()
See
Engine.execute() for details. |
Engine |
getEngine0()
Get the first Engine from the bundle list.
|
java.util.List<Engine> |
getEngines()
Get all Engines of this bundle.
|
int |
getPageCount()
See
Engine.getPageCount() for details. |
byte[] |
getPageData(int page)
See
Engine.getPageData(int) for details. |
PromptField |
getPromptField(java.lang.String name)
See
Engine.getPromptField(String) for details. |
EngineStatistics |
getStatistics()
See
Engine.getStatistics() for details. |
void |
setClientLocale(java.util.Locale locale)
See
Engine.setClientLocale(Locale) for details. |
void |
setDocumentOutput(DocumentOutput documentOutput)
Set the output location for the rendered data.
|
void |
setPrompt(java.lang.String name,
java.lang.String prompt)
See
Engine.setPrompt(String, String) for details. |
void |
setPrompt(java.lang.String prompt,
int i)
NOTE: Unlike
Engine.setPrompt(String, int) , the number i does not refer to prompt
i in any engine, but will count from the first engine onwards. |
void |
setUserProperties(java.util.Properties props)
See
Engine.setUserProperties(Properties) for details. |
void |
stop(java.lang.String message)
See
Engine.stop(String) for details. |
void |
stopAfterPage(int maxPageNo)
See
Engine.stopAfterPage(int) for details. |
public EngineBundle(java.lang.String format) throws ReportException
format
- One of the constant form Engine.ReportException
- if the format is not supported because it is tabularpublic Engine addReportFile(java.lang.String reportUrl) throws ReportException
reportUrl
- the report URL or file path to the *.rpt template.ReportException
- if the file can not be loaded or the format is currently not supportedpublic void setDocumentOutput(DocumentOutput documentOutput)
setDocumentOutput
in interface ReportGenerator
documentOutput
- The location for the data. This can be DocumentOutputStream or CachedOutput.public void execute() throws ReportException
Engine.execute()
for details.execute
in interface ReportGenerator
ReportException
- if Engine is not initialized or finished.ReportGenerator.getPageData(int)
public Engine getEngine0() throws ReportException
ReportException
- if no rpt file was set.public java.util.List<Engine> getEngines()
public int getPageCount() throws ReportException
Engine.getPageCount()
for details.getPageCount
in interface ReportGenerator
ReportException
- If rendering the report encounters a problempublic byte[] getPageData(int page) throws ReportException
Engine.getPageData(int)
for details.getPageData
in interface ReportGenerator
page
- The number of the page. The first page is 1, the second is 2, ... .
If the page number is bigger than the page count then null will be returned.ReportException
- If rendering the page encounters a problempublic void stop(java.lang.String message)
Engine.stop(String)
for details.stop
in interface ReportGenerator
message
- a message for the debug log.@Nonnull public EngineStatistics getStatistics()
Engine.getStatistics()
for details.getStatistics
in interface ReportGenerator
public void setUserProperties(java.util.Properties props) throws ReportException
Engine.setUserProperties(Properties)
for details.setUserProperties
in interface ReportGenerator
props
- The data to be set in a Properties object.ReportException
- if Engine is not initialized or finished.public void setClientLocale(@Nonnull java.util.Locale locale) throws ReportException
Engine.setClientLocale(Locale)
for details.setClientLocale
in interface ReportGenerator
locale
- The locale to be used by the clientReportException
- if Engine is not initialized or finished.public void stopAfterPage(int maxPageNo)
Engine.stopAfterPage(int)
for details.stopAfterPage
in interface ReportGenerator
maxPageNo
- The last page that should be rendered. 0 means "unlimited".public void setPrompt(java.lang.String name, java.lang.String prompt) throws ReportException
Engine.setPrompt(String, String)
for details.setPrompt
in interface ReportGenerator
name
- the name of the parameter fieldprompt
- value for parameter field as StringReportException
- if Engine is not initialized or finished.public PromptField getPromptField(java.lang.String name) throws ReportException
Engine.getPromptField(String)
for details.getPromptField
in interface ReportGenerator
name
- name of the prompt to fetchReportException
- if Engine is not initialized or finished.public void setPrompt(java.lang.String prompt, int i) throws ReportException
Engine.setPrompt(String, int)
, the number i does not refer to prompt
i in any engine, but will count from the first engine onwards. So if there are three engines with five
prompts each, i=12 will set the third prompt in the third engine.
See Engine.setPrompt(String, int)
for details.setPrompt
in interface ReportGenerator
prompt
- value for parameter field ii
- index in the parameter listReportException
- if Engine is not initialized or finished.Copyright © 1999-2020 by i-net software GmbH