Java Doc for JasperReportsUtils.java in  » J2EE » spring-framework-2.5 » org » springframework » ui » jasperreports » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.5 » org.springframework.ui.jasperreports 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.ui.jasperreports.JasperReportsUtils

JasperReportsUtils
abstract public class JasperReportsUtils (Code)
Utility methods for working with JasperReports. Provides a set of convenience methods for generating reports in a CSV, HTML, PDF and XLS formats.
author:
   Rob Harrop
author:
   Juergen Hoeller
since:
   1.1.3




Method Summary
public static  JRDataSourceconvertReportData(Object value)
     Convert the given report data value to a JRDataSource.
public static  voidrender(JRExporter exporter, JasperPrint print, Writer writer)
     Render the supplied JasperPrint instance using the supplied JRAbstractExporter instance and write the results to the supplied Writer.
public static  voidrender(JRExporter exporter, JasperPrint print, OutputStream outputStream)
     Render the supplied JasperPrint instance using the supplied JRAbstractExporter instance and write the results to the supplied OutputStream.
public static  voidrenderAsCsv(JasperReport report, Map parameters, Object reportData, Writer writer)
     Render a report in CSV format using the supplied report data.
public static  voidrenderAsCsv(JasperReport report, Map parameters, Object reportData, Writer writer, Map exporterParameters)
     Render a report in CSV format using the supplied report data.
public static  voidrenderAsHtml(JasperReport report, Map parameters, Object reportData, Writer writer)
     Render a report in HTML format using the supplied report data.
public static  voidrenderAsHtml(JasperReport report, Map parameters, Object reportData, Writer writer, Map exporterParameters)
     Render a report in HTML format using the supplied report data.
public static  voidrenderAsPdf(JasperReport report, Map parameters, Object reportData, OutputStream stream)
     Render a report in PDF format using the supplied report data.
public static  voidrenderAsPdf(JasperReport report, Map parameters, Object reportData, OutputStream stream, Map exporterParameters)
     Render a report in PDF format using the supplied report data.
public static  voidrenderAsXls(JasperReport report, Map parameters, Object reportData, OutputStream stream)
     Render a report in XLS format using the supplied report data.
public static  voidrenderAsXls(JasperReport report, Map parameters, Object reportData, OutputStream stream, Map exporterParameters)
     Render a report in XLS format using the supplied report data.



Method Detail
convertReportData
public static JRDataSource convertReportData(Object value) throws IllegalArgumentException(Code)
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.
Parameters:
  value - the report data value to convert the JRDataSource
throws:
  IllegalArgumentException - if the value could not be converted
See Also:   net.sf.jasperreports.engine.JRDataSource
See Also:   net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
See Also:   net.sf.jasperreports.engine.data.JRBeanArrayDataSource




render
public static void render(JRExporter exporter, JasperPrint print, Writer writer) throws JRException(Code)
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.
Parameters:
  exporter - the JRAbstractExporter to use to render the report
Parameters:
  print - the JasperPrint instance to render
Parameters:
  writer - the Writer to write the result to
throws:
  JRException - if rendering failed




render
public static void render(JRExporter exporter, JasperPrint print, OutputStream outputStream) throws JRException(Code)
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.
Parameters:
  exporter - the JRAbstractExporter to use to render the report
Parameters:
  print - the JasperPrint instance to render
Parameters:
  outputStream - the OutputStream to write the result to
throws:
  JRException - if rendering failed




renderAsCsv
public static void renderAsCsv(JasperReport report, Map parameters, Object reportData, Writer writer) throws JRException(Code)
Render a report in CSV format using the supplied report data. Writes the results to the supplied Writer.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  writer - the Writer to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsCsv
public static void renderAsCsv(JasperReport report, Map parameters, Object reportData, Writer writer, Map exporterParameters) throws JRException(Code)
Render a report in CSV format using the supplied report data. Writes the results to the supplied Writer.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  writer - the Writer to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
Parameters:
  exporterParameters - a Map of JRExporterParameter exporter parameters
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsHtml
public static void renderAsHtml(JasperReport report, Map parameters, Object reportData, Writer writer) throws JRException(Code)
Render a report in HTML format using the supplied report data. Writes the results to the supplied Writer.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  writer - the Writer to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsHtml
public static void renderAsHtml(JasperReport report, Map parameters, Object reportData, Writer writer, Map exporterParameters) throws JRException(Code)
Render a report in HTML format using the supplied report data. Writes the results to the supplied Writer.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  writer - the Writer to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
Parameters:
  exporterParameters - a Map of JRExporterParameter exporter parameters
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsPdf
public static void renderAsPdf(JasperReport report, Map parameters, Object reportData, OutputStream stream) throws JRException(Code)
Render a report in PDF format using the supplied report data. Writes the results to the supplied OutputStream.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  stream - the OutputStream to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsPdf
public static void renderAsPdf(JasperReport report, Map parameters, Object reportData, OutputStream stream, Map exporterParameters) throws JRException(Code)
Render a report in PDF format using the supplied report data. Writes the results to the supplied OutputStream.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  stream - the OutputStream to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
Parameters:
  exporterParameters - a Map of JRExporterParameter exporter parameters
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsXls
public static void renderAsXls(JasperReport report, Map parameters, Object reportData, OutputStream stream) throws JRException(Code)
Render a report in XLS format using the supplied report data. Writes the results to the supplied OutputStream.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  stream - the OutputStream to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



renderAsXls
public static void renderAsXls(JasperReport report, Map parameters, Object reportData, OutputStream stream, Map exporterParameters) throws JRException(Code)
Render a report in XLS format using the supplied report data. Writes the results to the supplied OutputStream.
Parameters:
  report - the JasperReport instance to render
Parameters:
  parameters - the parameters to use for rendering
Parameters:
  stream - the OutputStream to write the rendered report to
Parameters:
  reportData - a JRDataSource, java.util.Collectionor object array (converted accordingly), representing the report data to readfields from
Parameters:
  exporterParameters - a Map of JRExporterParameter exporter parameters
throws:
  JRException - if rendering failed
See Also:   JasperReportsUtils.convertReportData



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.