jACOB 2.7 API Documentation.

de.tif.jacob.report.birt
Class BirtReport

java.lang.Object
  extended by de.tif.jacob.report.birt.BirtReport

public class BirtReport
extends java.lang.Object

Class to create PDF or HTML reports out of BIRT report definitions.

Note: Data sources within BIRT report definitions, which match to jACOB SQL data sources, are adapted (i.e. changed) in such a way that the already given jACOB data source configuration is used. By this way BIRT reports become "environment/database" independant.

Since:
2.6

Field Summary
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
 
Constructor Summary
BirtReport(byte[] rptDefinition)
          Creates a BIRT report.
BirtReport(DataDocumentValue rptDefinition)
          Creates a BIRT report.
BirtReport(java.io.InputStream rptDefinitionStream)
          Creates a BIRT report.
 
Method Summary
 byte[] createHTML()
          Creates a HTML document as byte array from the BIRT report.
 void createHTML(java.io.OutputStream out)
          Creates a HTML document from the BIRT report and writes it to the given output stream.
 DataDocumentValue createHTMLDocument(java.lang.String documentName)
          Creates a HTML document from the BIRT report.
 byte[] createPDF()
          Creates a PDF document as byte array from the BIRT report.
 void createPDF(java.io.OutputStream out)
          Creates a PDF document from the BIRT report and writes it to the given output stream.
 DataDocumentValue createPDFDocument(java.lang.String documentName)
          Creates a PDF document from the BIRT report.
 void resetParameterValues()
          Resets all BIRT report parameter values.
 void setParameterValue(java.lang.String name, java.lang.Object value)
          Sets a BIRT report parameter to a given value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final transient java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

public static final transient java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values
Constructor Detail

BirtReport

public BirtReport(DataDocumentValue rptDefinition)
           throws java.lang.Exception
Creates a BIRT report.

Parameters:
rptDefinition - the BIRT report definition as data document value
Throws:
java.lang.Exception - on any problem

BirtReport

public BirtReport(byte[] rptDefinition)
           throws java.lang.Exception
Creates a BIRT report.

Parameters:
rptDefinition - the BIRT report definition as byte array
Throws:
java.lang.Exception - on any problem

BirtReport

public BirtReport(java.io.InputStream rptDefinitionStream)
           throws java.lang.Exception
Creates a BIRT report.

Parameters:
rptDefinitionStream - the BIRT report definition as input stream
Throws:
java.lang.Exception - on any problem
Method Detail

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.Object value)
Sets a BIRT report parameter to a given value.

Parameters:
name - the name of the BIRT report parameter
value - the parameter value

resetParameterValues

public void resetParameterValues()
Resets all BIRT report parameter values.

This method could be used to create multiple report output documents with different parameter settings without creating multiple instances of this class, which would lead to parse the BIRT report definition multiple times.


createPDFDocument

public DataDocumentValue createPDFDocument(java.lang.String documentName)
                                    throws java.lang.Exception
Creates a PDF document from the BIRT report.

Parameters:
documentName - the name of the document
Returns:
the PDF data document
Throws:
java.lang.Exception - on any problem

createHTMLDocument

public DataDocumentValue createHTMLDocument(java.lang.String documentName)
                                     throws java.lang.Exception
Creates a HTML document from the BIRT report.

Parameters:
documentName - the name of the document
Returns:
the HTML data document
Throws:
java.lang.Exception - on any problem

createPDF

public byte[] createPDF()
                 throws java.lang.Exception
Creates a PDF document as byte array from the BIRT report.

Returns:
the byte array containing the PDF document
Throws:
java.lang.Exception - on any problem

createHTML

public byte[] createHTML()
                  throws java.lang.Exception
Creates a HTML document as byte array from the BIRT report.

Returns:
the byte array containing the HTML document
Throws:
java.lang.Exception - on any problem

createPDF

public void createPDF(java.io.OutputStream out)
               throws java.lang.Exception
Creates a PDF document from the BIRT report and writes it to the given output stream.

Parameters:
out - the output stream
Throws:
java.lang.Exception - on any problem

createHTML

public void createHTML(java.io.OutputStream out)
                throws java.lang.Exception
Creates a HTML document from the BIRT report and writes it to the given output stream.

Parameters:
out - the output stream
Throws:
java.lang.Exception - on any problem

jACOB 2.7 API Documentation.