
Exporting report results to different file formats
There are several methods with which JReport Engine Bean can export a result file (.rst extension) to the different file formats (HTML, PDF, TEXT, XLS, PS etc.). The example program TestEngineBean.java in <designer_install_root>\help\designer\samples demonstrates how to use them. The function of one method can be varied with different parameters.
- exportToHtml
The method exportToHtml(java.lang.String htmlFileName) will take the method exportToHtml(java.lang.String htmlFileName, boolean bChartApplet, boolean isMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, boolean bAbsolute, int iBrowser) using the default parameter values such as: exportToHtml("HtmlFileName", false, true, false, true, true, true, JREngine.IE).
- exportToMail
Before the method exportToMail is called, the mail server should first be configured with the following method:
configMailServer(String SMTPServerIP, String MyMailAddress, int SMTPServerPort)
where
SMTPServerIP is the mail server IP address.
MyMailAddress is the sender's mail address.
SMTPServerPort is the mail server port.
- exportToMultiMail
- exportToPdf
- exportToText
- The method exportToText(java.lang.String textFileName, boolean isNormalText) will take the method exportToText(java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter) using the default parameter values such as:
exportToText( "TextFileName", isNormalText, false, ' ').
- The method exportToText(java.lang.String rstFileName, java.lang.String textFileName, boolean isNormalText) will take the method exportToText(java.lang.String rstFileName, java.lang.String textFileName, boolean isNormalText, boolean isRepeat, char delimiter) using the default parameter values such as:
exportToText( "ResultFileName", "TextFileName", isNormalText, false, ' ').
- exportToXlS
- exportToPS
- exportToRtf
- exportToXML
- exportToFax
If you want to export the report result to fax, you need to download the files listed in the table below from the website http://java.sun.com/products/javacomm/index.html, and then put them into the specified locations (on Windows).
| File Name |
Location |
| comm.jar |
<designer_install_root>\lib |
| javax.comm.properties |
<Java_install_root>\jre\lib |
| Win32Com.dll |
<Java_install_root>\jre\bin |
