JReport Engine Bean contains the following properties. All the data types of these properties are of Java string. The properties are listed below:
| Property | Description |
|---|---|
| UID | The JReport Runtime user ID. |
| key | The JReport Runtime key. |
| reportHome | The home path where report.ini and other JReport system files exist. |
| reportName | The name of the report which will be run by the engine. |
| catName | The name of the catalog which contains all the required objects used in the report. |
| paramValues | The string containing the parameter values, separated by a comma (','). |
| paramFile | The name of the parameter value file. This will be ignored if paramValues has been specified. |
| resultFile | The name of the result file. |
The following methods are used for assigning values to the above properties:
Where
c:\\jreport\\designer, then the first thing JReport Engine Bean will do when running a report is to check the jslc.dat and report.ini files in c:\jreport\designer\bin are valid."c:\\temp\\test.rst"). The resultFile contains both the path and the file name information. If there is no path specified, the current path will be used. If there is no file name specified, the reportName will be used (with an .rst extension).Notes:
* the parameter string is: "param1=aaa\\,aa,param2=bbbbb,param3=ccccc"
it will be parsed to:
the value for param1 is aaa, aa
the value for param2 is bbbbb
the value for param3 is ccccc
* the parameter string is: "pa\\=ram1=aaa\\,aa,param2=bbbbb,param3=ccccc"
it will be parsed to:
the value for pa=ram1 (name) is aaa, aa (value)
the value for param2 is bbbbb
the value for param3 is ccccc
The format of the parameter file is: one parameter name-value pair will take one line, and another parameter name-value pair will start from a new line. Each line is formatted as paramname=paramvalue, and JReport has also provided an escape operator (\\) for the equal sign same as above.
When passing multiple parameters in the paramValues string, note that you do not have to set all parameter values. If you do not set a parameter value, JReport will use the default value. Also, if you want to know the report's parameters without running reports, you can call the method getReportParams(). This method will return a vector, and each element of this vector is jet.formula.ParamDesc. The class ParamDesc has five public properties: