| java.lang.Object | |
| ↳ | org.springframework.ui.jasperreports.JasperReportsUtils |
Utility methods for working with JasperReports. Provides a set of convenience methods for generating reports in a CSV, HTML, PDF and XLS formats.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Convert the given report data value to a
JRDataSource. | |||||||||||
Render the supplied
JasperPrint instance using the
supplied JRAbstractExporter instance and write the results
to the supplied Writer. | |||||||||||
Render the supplied
JasperPrint instance using the
supplied JRAbstractExporter instance and write the results
to the supplied OutputStream. | |||||||||||
Render a report in CSV format using the supplied report data.
| |||||||||||
Render a report in CSV format using the supplied report data.
| |||||||||||
Render a report in HTML format using the supplied report data.
| |||||||||||
Render a report in HTML format using the supplied report data.
| |||||||||||
Render a report in PDF format using the supplied report data.
| |||||||||||
Render a report in PDF format using the supplied report data.
| |||||||||||
Render a report in XLS format using the supplied report data.
| |||||||||||
Render a report in XLS format using the supplied report data.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Convert the given report data value to a JRDataSource.
In the default implementation, a JRDataSource,
java.util.Collection or object array is detected.
The latter are converted to JRBeanCollectionDataSource
or JRBeanArrayDataSource, respectively.
| value | the report data value to convert |
|---|
null)| IllegalArgumentException | if the value could not be converted |
|---|
Render the supplied JasperPrint instance using the
supplied JRAbstractExporter instance and write the results
to the supplied Writer.
Make sure that the JRAbstractExporter implementation
you supply is capable of writing to a Writer.
| exporter | the JRAbstractExporter to use to render the report |
|---|---|
the JasperPrint instance to render |
|
| writer | the Writer to write the result to |
| if rendering failed | |
| JRException |
Render the supplied JasperPrint instance using the
supplied JRAbstractExporter instance and write the results
to the supplied OutputStream.
Make sure that the JRAbstractExporter implementation you
supply is capable of writing to a OutputStream.
| exporter | the JRAbstractExporter to use to render the report |
|---|---|
the JasperPrint instance to render |
|
| outputStream | the OutputStream to write the result to |
| if rendering failed | |
| JRException |
Render a report in CSV format using the supplied report data.
Writes the results to the supplied Writer.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| writer | the Writer to write the rendered report to |
| exporterParameters | a Map of JRExporterParameter exporter parameters |
| if rendering failed | |
| JRException |
Render a report in CSV format using the supplied report data.
Writes the results to the supplied Writer.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| writer | the Writer to write the rendered report to |
| if rendering failed | |
| JRException |
Render a report in HTML format using the supplied report data.
Writes the results to the supplied Writer.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| writer | the Writer to write the rendered report to |
| exporterParameters | a Map of JRExporterParameter exporter parameters |
| if rendering failed | |
| JRException |
Render a report in HTML format using the supplied report data.
Writes the results to the supplied Writer.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| writer | the Writer to write the rendered report to |
| if rendering failed | |
| JRException |
Render a report in PDF format using the supplied report data.
Writes the results to the supplied OutputStream.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| stream | the OutputStream to write the rendered report to |
| exporterParameters | a Map of JRExporterParameter exporter parameters |
| if rendering failed | |
| JRException |
Render a report in PDF format using the supplied report data.
Writes the results to the supplied OutputStream.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| stream | the OutputStream to write the rendered report to |
| if rendering failed | |
| JRException |
Render a report in XLS format using the supplied report data.
Writes the results to the supplied OutputStream.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| stream | the OutputStream to write the rendered report to |
| exporterParameters | a Map of JRExporterParameter exporter parameters |
| if rendering failed | |
| JRException |
Render a report in XLS format using the supplied report data.
Writes the results to the supplied OutputStream.
| report | the JasperReport instance to render |
|---|---|
| parameters | the parameters to use for rendering |
| reportData | a JRDataSource, java.util.Collection
or object array (converted accordingly), representing the report data to read
fields from |
| stream | the OutputStream to write the rendered report to |
| if rendering failed | |
| JRException |