|
JasperProcess |
|
|
The JasperProcess element prepares the inputs of the JasperReports reporting engine in the runtime and calls it to generate reports in PDF, Text, Excel (xls or csv) and RTF formats.
Properties Connection Name (Accepts MScript) The name of the JDBC connection defined with "mor > RelDB > RelDBConnection" element in Common Definitions file. The JasperProcess uses this connection to obtain the data for the report. Report File Name (Accepts MScript) The name of a report file (either with jrxml or jasper extension) should be given. Examples: Whether with jrxml or jasper extensions, all the Jasper files must be provided under {WEB_APPLICATION_ROOT}/WEB-INF/MM-INF/jasper-reports directory. See Server Item Types for JasperReports The SQL query that access to the data base through the JDBC connection specified with Connection Name property retrieves the data to fill in the report. The SQL defined in this property overrides the SQL of the report template which was defined when preparing the template with iReport tool. Using the MScript functions embedded in the SQL makes it possible to form the dynamic queries. For example a request parameter called cat_id can be used in the query as follows:
Report parameters (Accepts MScript) Any number of report parameters that are required by the report template can be defined in this property. Each parameter must be defined on a separate line in The PARAM_NAME is the name of the report parameter and the PARAM_VALUE should be an MScript expression. JasperProcess Parameter Examples:
This property defines the format of the output document. The supported formats are: 1. PDF, 2. Text, 3. Excel (xls), 4. Excel (csv), 5. RTF. Only the number before the "." character is significant for defining the type. Should this value be defined dynamically with MScript the the resolved value must be a number between 1 and 5. Example:
Otherwise JasperProcess throws an Exception. The name of the output document file. It can be the name of either a permanent or a temporary file. Note that the temporary files are created under {WEB_APPLICATION_ROOT}/WEB-INF/MM-INF/~tempfiles directory and the names of the files are stored in pool variables or in process record fields. MoreMotion constantly scans the temporary files under this folder and deletes the expired files.
Examples:
Sub Reports JasperReports supports Master-Detail reports through sub-reports. A sub-report receives its parameters from the master report and lists the inner records accordingly. Unlike the master report files that can be provided either as jrxml or jasper files, sub-report files can only be provided in jasper format. A report parameter called "SUBREPORT_DIR" should be defined in the master report file and the name of the sub-report should be specified as The JasperProcess sets the value of this parameter as {WEB_APPLICATION_ROOT}/WEB-INF/MM-INF/jasper-reports/ in the runtime. The Summary:
|