Interface ReportGenerator

  • All Known Implementing Classes:
    Engine, EngineBundle

    public interface ReportGenerator
    Helper interface to use the same code for Engine and EngineBundle
    Since:
    14.1
    • 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
      • stopAfterPage

        void stopAfterPage​(int maxPageNo)
        See Engine.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 ReportException
        Parameters:
        name - the name of the parameter field
        prompt - value for parameter field as String
        Throws:
        ReportException - if Engine is not initialized or finished.
        Since:
        14.1
      • setPrompt

        void setPrompt​(java.lang.String prompt,
                       int i)
                throws ReportException
        Parameters:
        prompt - value for parameter field i
        i - index in the parameter list
        Throws:
        ReportException - if Engine is not initialized or finished.
        Since:
        14.1
      • getPageData

        byte[] getPageData​(int page)
                    throws ReportException
        See Engine.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
      • stop

        void stop​(java.lang.String message)
        See Engine.stop(String) for details.
        Parameters:
        message - a message for the debug log.
        Since:
        14.1