Package com.inet.report
Interface ReportGenerator
-
- All Known Implementing Classes:
Engine,EngineBundle
public interface ReportGeneratorHelper interface to use the same code for Engine and EngineBundle- Since:
- 14.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute()SeeEngine.execute()for details.intgetPageCount()SeeEngine.getPageCount()for details.byte[]getPageData(int page)SeeEngine.getPageData(int)for details.PromptFieldgetPromptField(java.lang.String name)SeeEngine.getPromptField(String)for details.EngineStatisticsgetStatistics()SeeEngine.getStatistics()for details.voidsetClientLocale(java.util.Locale locale)SeeEngine.setClientLocale(Locale)for details.voidsetDocumentOutput(DocumentOutput documentOutput)Set the output location for the rendered data.voidsetPrompt(java.lang.String prompt, int i)SeeEngine.setPrompt(String, int)for details.voidsetPrompt(java.lang.String name, java.lang.String prompt)SeeEngine.setPrompt(String, String)for details.voidsetUserProperties(java.util.Properties props)SeeEngine.setUserProperties(Properties)for details.voidstop(java.lang.String message)SeeEngine.stop(String)for details.voidstopAfterPage(int maxPageNo)SeeEngine.stopAfterPage(int)for details.
-
-
-
Method Detail
-
setDocumentOutput
void setDocumentOutput(DocumentOutput documentOutput)
Set the output location for the rendered data. By default the memory (heap) is used. It is also possible to store the data into the report cache or stream it directly to an OutputStream. This must be set before call of execute().- Parameters:
documentOutput- The location for the data. This can be DocumentOutputStream or CachedOutput.- Since:
- 16.2
-
setUserProperties
void setUserProperties(java.util.Properties props) throws ReportExceptionSeeEngine.setUserProperties(Properties)for details.- Parameters:
props- The data to be set in a Properties object.- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
-
setClientLocale
void setClientLocale(@Nonnull java.util.Locale locale) throws ReportExceptionSeeEngine.setClientLocale(Locale)for details.- Parameters:
locale- The locale to be used by the client- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
-
stopAfterPage
void stopAfterPage(int maxPageNo)
SeeEngine.stopAfterPage(int)for details.- Parameters:
maxPageNo- The last page that should be rendered. 0 means "unlimited".- Since:
- 14.1
-
setPrompt
void setPrompt(java.lang.String name, java.lang.String prompt) throws ReportExceptionSeeEngine.setPrompt(String, String)for details.- Parameters:
name- the name of the parameter fieldprompt- value for parameter field as String- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
-
getPromptField
PromptField getPromptField(java.lang.String name) throws ReportException
SeeEngine.getPromptField(String)for details.- Parameters:
name- name of the prompt to fetch- Returns:
- PromptField by the given name in this Report, or null if none exists
- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
-
setPrompt
void setPrompt(java.lang.String prompt, int i) throws ReportExceptionSeeEngine.setPrompt(String, int)for details.- Parameters:
prompt- value for parameter field ii- index in the parameter list- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
-
execute
void execute() throws ReportExceptionSeeEngine.execute()for details.- Throws:
ReportException- if Engine is not initialized or finished.- Since:
- 14.1
- See Also:
getPageData(int)
-
getPageCount
int getPageCount() throws ReportExceptionSeeEngine.getPageCount()for details.- Returns:
- number of pages or chunks
- Throws:
ReportException- If rendering the report encounters a problem- Since:
- 14.1
-
getPageData
byte[] getPageData(int page) throws ReportExceptionSeeEngine.getPageData(int)for details.- Parameters:
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.- Returns:
- the binary data for the Java Viewer or the bytes of the exported file (page).
- Throws:
java.lang.IllegalArgumentException- if the page number is zero or negative.ReportException- If rendering the page encounters a problem- Since:
- 14.1
-
getStatistics
@Nonnull EngineStatistics getStatistics()
SeeEngine.getStatistics()for details.- Returns:
- the statistic
- Since:
- 14.1
-
stop
void stop(java.lang.String message)
SeeEngine.stop(String)for details.- Parameters:
message- a message for the debug log.- Since:
- 14.1
-
-