Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » views » jasperreports » [javadoc | source]
org.apache.struts2.views.jasperreports
public class: JasperReportsResult [javadoc | source]
java.lang.Object
   org.apache.struts2.dispatcher.StrutsResultSupport
      org.apache.struts2.views.jasperreports.JasperReportsResult

All Implemented Interfaces:
    JasperReportConstants, com.opensymphony.xwork2.Result, StrutsStatics

Generates a JasperReports report using the specified format or PDF if no format is specified.

This result type takes the following parameters:

This result follows the same rules from StrutsResultSupport . Specifically, all parameters will be parsed if the "parse" parameter is not set to false.

Example:


<result name="success" type="jasper">
  <param name="location">foo.jasper</param>
  <param name="dataSource">mySource</param>
  <param name="format">CSV</param>
</result>
or for pdf

<result name="success" type="jasper">
  <param name="location">foo.jasper</param>
  <param name="dataSource">mySource</param>
</result>
Field Summary
protected  String dataSource     
protected  String format     
protected  String documentName     
protected  String contentDisposition     
protected  String delimiter     
protected  String imageServletUrl     
protected  String timeZone     
protected  String connection    Connection which can be passed to the report instead od dataSource. 
protected  String reportParameters    Names a report parameters map stack value, allowing additional report parameters from the action. 
protected  String exportParameters    Names an exporter parameters map stack value, allowing the use of custom export parameters. 
Fields inherited from org.apache.struts2.dispatcher.StrutsResultSupport:
DEFAULT_PARAM
Constructor:
 public JasperReportsResult() 
 public JasperReportsResult(String location) 
    Default ctor with location.
    Parameters:
    location - Result location.
Method from org.apache.struts2.views.jasperreports.JasperReportsResult Summary:
doExecute,   getConnection,   getExportParameters,   getImageServletUrl,   getReportParameters,   setConnection,   setContentDisposition,   setDataSource,   setDelimiter,   setDocumentName,   setExportParameters,   setFormat,   setImageServletUrl,   setReportParameters,   setTimeZone
Methods from org.apache.struts2.dispatcher.StrutsResultSupport:
conditionalParse,   doExecute,   execute,   getLastFinalLocation,   getLocation,   setEncode,   setLocation,   setParse
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.views.jasperreports.JasperReportsResult Detail:
 protected  void doExecute(String finalLocation,
    ActionInvocation invocation) throws Exception 
 public String getConnection() 
 public String getExportParameters() 
 public String getImageServletUrl() 
 public String getReportParameters() 
 public  void setConnection(String connection) 
 public  void setContentDisposition(String contentDisposition) 
 public  void setDataSource(String dataSource) 
 public  void setDelimiter(String delimiter) 
 public  void setDocumentName(String documentName) 
 public  void setExportParameters(String exportParameters) 
 public  void setFormat(String format) 
 public  void setImageServletUrl(String imageServletUrl) 
 public  void setReportParameters(String reportParameters) 
 public  void setTimeZone(String timeZone) 
    set time zone id