Interface IRenderTask

All Superinterfaces:
IEngineTask

public interface IRenderTask extends IEngineTask
An engine task that renders a Report Document to one of the output formats supported by the engine.
  • Method Details

    • setRenderOption

      void setRenderOption(IRenderOption options)
      set the rendering options
      Parameters:
      settings - the rendering options
    • getRenderOption

      IRenderOption getRenderOption()
      Returns:
      the render option
    • setEmitterID

      void setEmitterID(String id)
      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

      void setPageNumber(long pageNumber) throws EngineException
      Sets number of the page to be rendered.
      Parameters:
      pageNumber - number of the page.
      Throws:
      EngineException - if pageNumber is invalid.
    • setInstanceID

      void setInstanceID(InstanceID iid) throws EngineException
      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 - if iid is invalid.
    • setInstanceID

      void setInstanceID(String iid) throws EngineException
      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 - if iid is invalid.
    • setPageRange

      void setPageRange(String pageRange) throws EngineException
      Sets range of the pages to be rendered.
      Parameters:
      pageRange - range of the pages.
      Throws:
      EngineException - if pageRange is invalid.
    • setBookmark

      void setBookmark(String bookmark) throws EngineException
      Sets bookmark. If bookmark is set, render method will render the page which contains this bookmark.
      Parameters:
      bookmark - the bookmark.
      Throws:
      EngineException - if bookmark is invalid.
    • setReportlet

      void setReportlet(String bookmark) throws EngineException
      Sets reportlet by bookmark. The reportlet represented by the bookmark will be render.
      Parameters:
      bookmark - the bookmark.
      Throws:
      EngineException - if bookmark is invalid.
    • render

      void render() throws EngineException
      render the whole report document or an output format
      Throws:
      EngineException - if rendering fails
    • render

      @Deprecated void render(long pageNumber) throws EngineException
      Deprecated.
      A page with speicfic page number can be rendered like this:
          setPageNumber( pageNumber );
          render( );
      Parameters:
      pageNumber -
      Throws:
      EngineException
    • render

      @Deprecated void render(String pageRange) throws EngineException
      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 void render(InstanceID iid) throws EngineException
      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

      long getPageCount() throws EngineException
      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

      long getTotalPage() throws EngineException
      Returns:
      the visible page count in the report.
      Throws:
      EngineException
    • getPageNumber

      long getPageNumber(String bookmark) throws EngineException
      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

      ITOCTree getTOCTree() throws EngineException
      Get the TOC tree
      Parameters:
      format - the format to generate the report
      locale - the locale information to generate the report
      Throws:
      EngineException
    • setPageHandler

      void setPageHandler(IPageHandler callback)
      set up event handler to be called after each page is generated
      Parameters:
      callback - a callback function that is called after each checkpoint