Interface IRenderTask
- All Superinterfaces:
IEngineTask
An engine task that renders a Report Document to one of the output formats
supported by the engine.
-
Field Summary
Fields inherited from interface org.eclipse.birt.report.engine.api.IEngineTask
CANCEL_ON_ERROR, CONTINUE_ON_ERROR, STATUS_CANCELLED, STATUS_FAILED, STATUS_NOT_STARTED, STATUS_RUNNING, STATUS_SUCCEEDED, TASK_DATAEXTRACTION, TASK_DATASETPREVIEW, TASK_GETPARAMETERDEFINITION, TASK_RENDER, TASK_RUN, TASK_RUNANDRENDER, TASK_UNKNOWN
-
Method Summary
Modifier and TypeMethodDescriptionlong
Gets count of the pages that is output.long
getPageNumber
(String bookmark) Given a bookmark in a report, find the (first) page that the bookmark appears in (for hyperlinks to a bookmark)Get the TOC treelong
void
render()
render the whole report document or an output formatvoid
render
(long pageNumber) Deprecated.void
Deprecated.A range of pages can be rendered like this:
setPageRange( pageRange );
render( );
void
render
(InstanceID iid) Deprecated.A page which contains the instance can be rendered like this:
setInstanceID( instanceID );
render( );
void
setBookmark
(String bookmark) Sets bookmark.void
setEmitterID
(String id) sets a specific emitter to use when generate output.void
setInstanceID
(String iid) Sets id of instance which is a string type.void
setInstanceID
(InstanceID iid) Sets id of instance.void
setPageHandler
(IPageHandler callback) set up event handler to be called after each page is generatedvoid
setPageNumber
(long pageNumber) Sets number of the page to be rendered.void
setPageRange
(String pageRange) Sets range of the pages to be rendered.void
setRenderOption
(IRenderOption options) set the rendering optionsvoid
setReportlet
(String bookmark) Sets reportlet by bookmark.Methods inherited from interface org.eclipse.birt.report.engine.api.IEngineTask
addScriptableJavaObject, cancel, cancel, close, getAppContext, getCancelFlag, getEngine, getErrors, getID, getLocale, getLogger, getParameterDisplayText, getParameterValue, getParameterValues, getReportRunnable, getStatus, getTaskType, getULocale, setAppContext, setDataSource, setDataSource, setErrorHandlingOption, setLocale, setLocale, setLogger, setParameter, setParameter, setParameterDisplayText, setParameterDisplayText, setParameterValue, setParameterValue, setParameterValues, setProgressMonitor, setStatusHandler, setTimeZone, setUserACL, validateParameters
-
Method Details
-
setRenderOption
set the rendering options- Parameters:
settings
- the rendering options
-
getRenderOption
IRenderOption getRenderOption()- Returns:
- the render option
-
setEmitterID
sets a specific emitter to use when generate output. Used when there are more than one emitters that support a single format. One example is the FO-based PDF emitter and the new PDF emitter added in BIRT2.0. If this function is not called when there are more than 1 emitters that support a format, engine may arbitrarily pick one.- Parameters:
id
- the identifier for the emitter
-
setPageNumber
Sets number of the page to be rendered.- Parameters:
pageNumber
- number of the page.- Throws:
EngineException
- ifpageNumber
is invalid.
-
setInstanceID
Sets id of instance. If instance id is set, render method will render the page which contains this instance.- Parameters:
iid
- id of the instance.- Throws:
EngineException
- ifiid
is invalid.
-
setInstanceID
Sets id of instance which is a string type. If instance id is set, render method will render the page which contains this instance.- Parameters:
iid
- the string type instance id of the instance.- Throws:
EngineException
- ifiid
is invalid.
-
setPageRange
Sets range of the pages to be rendered.- Parameters:
pageRange
- range of the pages.- Throws:
EngineException
- ifpageRange
is invalid.
-
setBookmark
Sets bookmark. If bookmark is set, render method will render the page which contains this bookmark.- Parameters:
bookmark
- the bookmark.- Throws:
EngineException
- ifbookmark
is invalid.
-
setReportlet
Sets reportlet by bookmark. The reportlet represented by the bookmark will be render.- Parameters:
bookmark
- the bookmark.- Throws:
EngineException
- ifbookmark
is invalid.
-
render
render the whole report document or an output format- Throws:
EngineException
- if rendering fails
-
render
Deprecated.A page with speicfic page number can be rendered like this:
setPageNumber( pageNumber );
render( );
- Parameters:
pageNumber
-- Throws:
EngineException
-
render
Deprecated.A range of pages can be rendered like this:
setPageRange( pageRange );
render( );
Render the page from startPageNumber to endPageNumber in the Report Doucment to an output format.- Throws:
EngineException
-
render
Deprecated.A page which contains the instance can be rendered like this:
setInstanceID( instanceID );
render( );
Render the Reportlet whose container is identified by iid. Useful for Reportlet support- Parameters:
itemInstanceID
- the report iteminstance to be rendered- Throws:
EngineException
-
getPageCount
Gets count of the pages that is output. This method can only be invoked after render task is finished otherwise an engine exception will be thrown.- Throws:
EngineException
-
getTotalPage
- Returns:
- the visible page count in the report.
- Throws:
EngineException
-
getPageNumber
Given a bookmark in a report, find the (first) page that the bookmark appears in (for hyperlinks to a bookmark)- Parameters:
bookmarkName
- bookmark name- Returns:
- the page number that the instance appears first
- Throws:
EngineException
-
getTOCTree
Get the TOC tree- Parameters:
format
- the format to generate the reportlocale
- the locale information to generate the report- Throws:
EngineException
-
setPageHandler
set up event handler to be called after each page is generated- Parameters:
callback
- a callback function that is called after each checkpoint
-
setPageNumber( pageNumber );
render( );