public interface RenderData
getExportChunkCount
and getNextExportChunk
.Modifier and Type | Field and Description |
---|---|
static int |
CASE_SENSITIVE
Search option: Search results must match the case of the search term.
|
static int |
REGULAR_EXPRESSION
Search option: Search result must fit to the search term's regular expression (Java Regex)
|
static int |
WHOLE_WORD
Search option: Only a search result if the entire word is equal to the search term.
|
Modifier and Type | Method and Description |
---|---|
RenderData |
getCopy()
"Clones" this RenderData object with all its properties and returns the copy.
|
int |
getExportChunkCount(java.util.Properties expProps)
Returns the total number of export "chunks" for the report for the specified export format.
|
byte[] |
getFontData(int fontID)
Returns the byte array of the embedded font at the specified fontId,
which is encoded in the Viewer's protocol.
|
byte[] |
getGroupTree()
Returns the group tree which can be sent to the java viewer as a byte array.
|
byte[] |
getNextExportChunk()
Returns the next chunk of the exported report if there is at least one more chunk available.
|
int |
getPageCount()
Returns the number of pages in the report.
|
byte[] |
getPageData(int page)
Returns the binary data of one page for the Java Viewer.
|
java.util.Properties |
getProperties()
Returns the Properties object used by this RenderData object.
|
java.lang.String |
getReportLocation()
Returns the location of the report set by setReportLocation.
|
java.lang.String |
getReportProperty(java.lang.String key)
Returns the chosen property value which has been set either via setReportProperty or otherwise.
|
java.lang.String |
getReportTitle()
Returns the manually set title of the report if there is one, that is, what would be typically displayed in a title bar, e.g.
|
boolean |
isPageLimitExceeded()
Check if the rendering of the report ran into a page limit.
|
boolean |
isPromptOnRefresh()
Returns the property "promptOnRefresh", that is, whether prompts are to be shown
whenever new data is fetched from the server.
|
byte[] |
refreshPageData(int page)
Enforces the whole report to be re-rendered on server side and returns the refreshed binary data of one page for the Java Viewer.
|
void |
resetServerCacheTimeout()
Notifies the server that the report with the currently set properties is
still being viewed and therefore should not be removed from the cache yet
if there is one.
|
byte[] |
search(java.lang.String phrase,
int startPage,
int flags)
Searches the given phrase in the report, starting at a certain page and using
the search options given in the flags.
|
void |
setPromptOnRefresh(boolean promptOnRefresh)
Sets the property "promptOnRefresh", that is, whether prompts are to be shown whenever the report is refreshed, that is,
whenever new data is fetched from the server.
|
void |
setReportLocation(java.lang.String location)
Sets the location of the report which this RenderData is to obtain its data for.
|
void |
setReportProperty(java.lang.String key,
java.lang.String value)
Sets the given property for the report.
|
void |
setReportTitle(java.lang.String title)
Sets the title of the report.
|
void |
stop()
Stops and cancels the rendering process if one is running.
|
static final int WHOLE_WORD
search(String, int, int)
,
Constant Field Valuesstatic final int CASE_SENSITIVE
search(String, int, int)
,
Constant Field Valuesstatic final int REGULAR_EXPRESSION
search(String, int, int)
,
Constant Field Valuesvoid setReportTitle(java.lang.String title)
title
- Title of the report as simple string.java.lang.String getReportTitle()
void setReportLocation(java.lang.String location)
location
- The location at which the report can be found. May not be null. *java.lang.String getReportLocation()
*
byte[] getPageData(int page) throws ViewerException
page
- The number of the page. The first page is 1, the second is 2, ... .
ViewerException
- If an exception is returned from the server, it is wrapped in a ViewerException.
Often this will be a com.inet.report.ReportExceptiongetPageCount()
int getPageCount() throws ViewerException
ViewerException
- If there are rendering problems, etc.getPageData(int)
boolean isPageLimitExceeded() throws ViewerException
ViewerException
- If there are rendering problems, etc.byte[] getNextExportChunk() throws ViewerException
ViewerException
- If there are connection problems or other issues while fetching the datagetExportChunkCount(Properties)
int getExportChunkCount(java.util.Properties expProps) throws ViewerException
expProps
- Properties to be appended to the current report properties for this export.
The properties should contain at least the export format with the key "export_fmt". The following
formats are valid:ViewerException
- If there are connection problems or other issues while fetching the datagetNextExportChunk()
,
getProperties()
byte[] getGroupTree() throws ViewerException
ViewerException
- If there are connection problems or other issues while fetching the databyte[] refreshPageData(int page) throws ViewerException
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 the data from the last page will be returned.ViewerException
- If there are connection problems or other issues while
fetching the datagetPageCount()
void setReportProperty(java.lang.String key, java.lang.String value)
key
- Name of property to set, will be converted to lower casevalue
- Value of property to set, null to remove this propertyjava.lang.String getReportProperty(java.lang.String key)
key
- Name of property to get value forjava.util.Properties getProperties()
Note also that any key values should be set in lower case. This Properties object will never be null, at most it will be empty.
void setPromptOnRefresh(boolean promptOnRefresh)
promptOnRefresh
- Value to set for this propertyboolean isPromptOnRefresh()
RenderData getCopy()
ReportViewer.addNewReportView(RenderData)
,
getProperties()
void stop()
byte[] search(java.lang.String phrase, int startPage, int flags)
WHOLE_WORD : search only the word in its entirety, not parts of words.
CASE_SENSITIVE : observe upper and lower cases in the search, that is "Search" != "search"
REGULAR_EXPRESSION : The search phrase is to be handled as a regular expression (using Java's Regex
methods for the search).
Desired flags should be connected by the OR operator "|". So, for example, to search with the flags WHOLE_WORD and CASE_SENSITIVE, simply use WHOLE_WORD | CASE_SENSITIVE as the flags option.
Note that phrases going over more than one page will not be found, nor will text parts with formatting inside the word itself, such as this word. Note that this method is thread-safe, that is, two or more threads concurrently calling this method and the other thread-safe methods in RenderData should cause no problems.
phrase
- Word or phrase to search. Should be a regular expression if this flag is set.startPage
- Page to start searching on (1-based)flags
- Desired search options (see above)WHOLE_WORD
,
CASE_SENSITIVE
,
REGULAR_EXPRESSION
byte[] getFontData(int fontID)
The fontID is 1-based. null
will be returned if there are no fonts embedded for the
report of this Engine. If fontID is greater than the number of embedded
fonts available it will return the last font available. This method is the mirror method to com.inet.report.Engine.getFontData(int),
so implementations can either call that if an engine is available, or a running i-net Clear Reports server
also returns the font data with an HTTP request of the form
"http://server:9000/?report=report.rpt&export_fmt=font&page=FONTID&cmd=get_pg" where FONTID is replaced with the given font ID.
Note that this method is thread-safe, that is, two or more threads concurrently calling
this method and the other thread-safe methods in RenderData should cause no problems.
fontID
- ID of font as specified in the i-net Clear Reports protocolvoid resetServerCacheTimeout()
This method will be called in regular intervals (default is every 5 minutes) by its corresponding ReportView(s).
ViewerException
- if resetting the cache timeout is not supported by the RenderData
implementation. This will cause the viewer to stop calling this method in regular intervals.Copyright © 1999-2020 by i-net software GmbH