JReport Designer Minimum Workstation Requirements OS: Microsoft Windows 2000, XP, 2003 Solaris, Linux CPU: PIII - 450MHz PIII 450 or sunSPARC 400 Memory: 128 MB 128 MB Disk: 128 MB free 128 MB free JDK: 1.3.0 or above 1.3.0 or above Recommended Workstation Requirements OS: Microsoft Windows 2000, XP, 2003 Solaris, Linux CPU: P4 - 1.5GHz P4 1.5G or sunSPARC 1G Memory: 256 MB 256 MB Disk: 256 MB free 256 MB free JDK: 1.4.1_02 or above 1.4.1_02 or above Note: JReport supports Java VMs from Sun and IBM. Other vendor's Java VMs may cause unexpected errors. Jinfonet technical support welcomes any feedback on the use of other Java VMs.
Please follow the steps listed below to install JReport Designer:
- Download the JReport install program jrpsetup.exe from the Jinfonet website: http://www.jinfonet.com.
- Run jrpsetup.exe and follow the default prompts to install.
During installation, please note that:
- The InstallShield will first find a JVM to get started. If no JVM is found, the installer will fail to launch. To solve this issue, you can install JReport from a DOS command by specifying -is:javahome option for the InstallShield as below:
jrpsetup.exe -is:javahome d:\j2sdk1.4.1_06- The InstallShield will generate temp files during installation. You can specify the temp directory with -is:tempdir option as below. Otherwise, system temp directory will be used. Temp files will automatically be removed once the installation is complete.
jrpsetup.exe -is:tempdir c:\temp
- You are recommended to use JDK version 1.4.1 or above. We have encountered certain issues, such as designing problems with JDK 1.4.0.x.
- The installer provides a chance for you to add additional classpaths. Also, after installation, you can choose to add them manually into the JReport.bat or setenv.bat file under %install_root%\bin.
- If you select to install JReport Designer in a folder that contains a copy of JReport Designer, the installer will replace the packages and create new batch/script files. Meanwhile, a copy of the old batch/shell files will be kept for your reference. You are recommended to use the batch/script files that come with the installer to make sure that all new packages are added into the classpath.
Use one of the following ways to uninstall JReport Designer:
- From the Start menu, select JReport Designer XXX (version number), and then click Uninstall JReport Designer.
- From the Control Panel, open Add/Remove Programs, and then select JReport Designer XXX to remove it.
- Run uninstaller.exe under %install_root%\_uninst.
Note: The uninstaller will remove all files generated by the installer, while the files that are created later by the program will be retained. You can remove these manually.
Use one of the following ways to run JReport Designer:
- Double-click the shortcut of JReport Designer on the desktop.
- From the Start menu, select JReport Designer XXX (version number), and click JReport Designer.
- Run the batch file from a MS-DOS command prompt. Please type the following commands (Assuming that JReport Designer has been installed under C:\JReport):
C:\>cd JReport\bin
C:\JReport\bin>jreport.bat
To install JReport Designer on Unix, please follow the steps below:
- Download the JReport Designer install program for Unix jrpsetup.sh (JReport also provides jrpsetup_linux.bin for the Linux users) from the Jinfonet web site: http://www.jinfonet.com.
- Click the executable file jrpsetup.sh to launch the InstallShield wizard. Or, open a console window. Change the directory to the location of the jrpsetup.sh file. The following are the examples of the commands that can be used:
$ cd thepath
To make jrpsetup.sh executable, type the command:
$ chmod +x jrpsetup.sh
Run jrpsetup.sh:
$ ./jrpsetup.sh
Note: The InstallShield will first find a JVM to get started. If no JVM is found, the installer is failed to launch. To solve this issue you can specify a JVM for the InstallShield with the option-is:javahomelike below.
$ ./jrpsetup.sh -is:javahome /home/j2sdk1.4.1_06For the Linux users, if the InstallShield still cannot find the JVM, you can use jrpsetup_linux.bin instead of jrpsetup.sh.
You are recommended to use JDK version 1.4.1 or above. We have found some known issues like designing problems with JDK 1.4.0.x.
In addition, The InstallShield will generate temp files during installation. You can specify the temp directory with-is:tempdiroption like below. Otherwise, system temp directory will be used. Temp files will be automatically removed once the installation is complete.
$ ./jrpsetup.sh -is:tempdir /home/temp
- Once InstallShield has been successfully loaded, you can follow the default prompt to install JReport Designer.
To run JReport Designer on Unix, run the script file JReport.sh under %install_root%/bin.
$ ./JReport.sh
Note: you can modify this script file to add additional classes before launching JReport Designer.To uninstall JReport Designer on Unix, execute uninstaller.sh under
%install_root%/_uninst, or open a console window. Change the directory to the location of the uninstaller.sh file. The following show examples of the commands that can be used:
$ cd thepath
Run uninstaller.sh:
$ ./uninstaller.sh
You need to create a data source before you can start designing reports with JReport Designer. JReport Designer is relational database oriented reporting software. That is, the data for reporting is a relational table such as a two-dimension data sheet. Java Database Connectivity (JDBC) or Java Database Connectivity - Open Database Connectivity (JDBC-ODBC) connection are the basic approaches for connecting to a database for data. Additional methods have also been provided to access data stored in various ways.
Currently, there are four approaches with which you can connect to data:
- JDBC Connection: Allows you to connect to a database via a JDBC Driver.
- JDBC ODBC Bridge: Allows you to connect to a database via JDBC ODBC Bridge.
- OOJDBC Driver: Allows you to use XML and EJB as a data source, and import the data to JReport.
- User Defined Source (UDS) API: Through User Data Source (UDS) API, JReport Designer can also access data from an external data source, such as a text file, Lotus Notes, which is not stored in a database or when there is no JDBC driver available.
To connect to a database via a JDBC driver,
- Install the JDBC driver according to the instructions provided by the JDBC driver provider.
- Edit JReport.bat/JReport.sh or setenv.bat, which are contained in the bin folder under %install_root%, by appending the classpath for the JDBC driver. %install_root% is the path where you installed JReport Designer.
Note: This step is very important, missing JDBC driver for JReport start-up batch or command line will result in the "ClassNotFoundError" message when you try to run a report.Here we will show you two examples for setting up JDBC Driver.
Example 1: Installing a Sybase JDBC Driver:
- Install Sybase JDBC driver Jconnect.class, run the SQL file sql_server.sql to create the JDBC metadata tables. (Please refer to the user's guide of Sybase installation for further details.)
- Modify the setenv.bat by appending the archive file path of the driver to the set ADDCLASSPATH system variable:
set REPORTHOME=C:\JReport
set JAVAHOME=C:\j2sdk1.4.2_01
set ADDCLASSPATH=c:\jconnect\classes
Or edit JReport\bin\JReport.bat/JReport.sh by appending the archive file path of the driver to the classpath:
Change:... -classpath "%REPORTHOME%\lib\SwingDesigner.zip;%REPORTHOME%\lib\resources.zip;..."
To :... -classpath "%REPORTHOME%\lib\SwingDesigner.zip;c:\jconnect\classes;%REPORTHOME%\lib\resources.zip;..."
Example 2: Installing an Oracle JDBC Driver:
- Install Oracle JDBC driver classes12.zip/Classes12.jar (for Oracle 8i or 9i) or ojdbc14.jar (for Oracle 9i).
- Modify the setenv.bat by appending the archive file path of the driver to the set ADDCLASSPATH system variable:
set REPORTHOME=C:\JReport
set JAVAHOME=C:\j2sdk1.4.2_01
set ADDCLASSPATH=c:\orc\thin\lib\classes111.zip
Or edit JReport\bin\JReport.bat JReport.sh by appending the archive file of Oracle thin driver to classpath:
Change:... -classpath "%REPORTHOME%\lib\SwingDesigner.zip;%REPORTHOME%\lib\resources.zip;..."
To :... -classpath "%REPORTHOME%\lib\SwingDesigner.zip;c:\orc\thin\lib\classes111.zip;%REPORTHOME%\lib\resources.zip;..."
The information in this topic was current at the time of release. However, it may no longer be valid due to changes during the release cycle. The most current information can be found in the readme.txt with each version under the path %installroot%.
You can find a set of utilities in the directory %installroot%\bin\. All of these batch files (Win)/script files (Unix) can be edited to suit different circumstances. However, always do this before making sure of their functions.
- setenv.bat: Set JReport Designer environment variables, and is called by JReport.bat, DJReport.bat and NJReport.bat when running JReport Designer. The following are descriptions for items in the file:
- set REPORTHOME=: The directory where you installed JReport Designer. Please do not modify this variable.
- set JAVAHOME=: The directory where the JDK that is currently used by JReport Designer is located. Change it if you want to switch a different JDK version.
- set ADDCLASSPATH=: Please add your necessary classpaths here. You can also add them in the classpath of JReport.bat/JReport.sh, NJReport.bat/NJReport.sh, or DJReport.bat/DJReport.sh files.
- JReport.bat/JReport.sh: Batch file/Script file for starting JReport Designer.
- NJReport.bat/NJReport.sh: Batch file/Script file for starting JReport Designer without the JIT option.
- DJReport.bat/DJReport.sh: Batch file/Script file for starting JReport Designer in logging mode. Usually in case of problems, we allow users to launch JReport Designer with this batch file/script file to track the detailed log information. Running this batch file/script file will generate the log file JReport.log in the current directory.
- CatDr.bat/CatDr.sh: Batch file/Script file for starting Catalog Doctor to make changes of the resources in the catalog.
- EConvert.bat/EConvert.sh: Batch file for removing the evaluation mark from reports. If you purchased our product and was successful in running JReport Designer with the new key, but the evaluation watermarks are still left. You need to run this batch file to remove the evaluation watermarks. Run the batch file with the report name(s) to be converted with the full path as parameter.
Econvert.bat [ReportName.cls]
Example:
Econvert.bat c:\JReport\Demo\reports\*.cls- jrenv.bat/jrenv.sh: Batch file/Script file for generating the report environment file - report.env. In case of problem, this file can help the Jinfonet support staff to assist you.
- PropConvert.bat: You can use this tool to modify report object properties without using JReport Designer. This is useful when you want to modify several properties using the same value at one time. For example, a Label and several DBFields may share the same background as blue, but now you want to change them all to transparent, you can simply use this tool. To use this tool, do one of the following:
- Double click to run this tool, on the JReport Property Converter dialog, type the file name (use *.cls if you want to apply the change to all the catalog reports), enter object name (leave this field blank if you want to apply the change to all objects), select the property name from the drop down list, provide the old value (leave this field blank if you want to apply the change to all the objects that have this property) and new value respectively, and then click Convert. The property of the report object(s) that meets the requirements will be changed to the new value that you specified.
- Use the command line to execute this tool as:
PropConvert [-vdebug] [-verror] -f:FilePathName -p:PropName -ov:[OldValue] -nv:NewValue
For example:
C:\JReport\bin>propconvert -vdebug -verror -f:C:\JReport\Demo\Reports\*.cls -p:FontF
ace -ov:Serif -nv:Dialog
Note: You can use wildcards for report file name. Leave the -ov: empty if you want to apply the change to all the objects that have this property, for exampel,-ov: -nv:Dialog.- rp.bat/rp.sh: Batch file/Script file for installing a new key without reinstalling the product. You can run this program using the following command:
For Windows
rp.bat [ID] [Password]
For Unix
./rp.sh [ID] [Password]- UDOMaker.bat: User Defined Object maker to import beans.
- ModelWizard.bat: ObjectDataSource importer.
- ConvertUnit.bat/ConvertUnit.sh: Batch file/Script file for converting a report with resolution errors to use correct resolutions. Before using this file, you should first modify the property value as below:
1. When you edit the file, you will find a property named -Dresolution. This property is used to set the original resolution the report used. The default value we set this property is 72. You should modify it according to the following rules:
a. If the report file was saved before build 472 (not including 472), you can remove this resolution option.
b. If the report file was saved before build 495 (not including 495), you should set the resolution to 72.
c. If the report file was saved before build 501 (not including 501), you should remove this resolution option.
d. If the report file was saved after build 501, please do not use this batch.
2. After you have modified this property, you can run the batch file using the following command:
ConvertUnit [drive:] [path] [filename]
For example, if you want to convert the report named
Lesson2.cls located at c:\JReport\demo\Reports\SunVMDemo,
you should key in:
ConvertUnit c:\JReport\demo\Reports\SunVMDemo\Lesson2.cls- upName.bat/upName.sh: Update the name of DBField in the report using the field name in catalog for exporting to XML file.
- JRTutorial.bat: Run this batch file to display the tutorial help.
You can launch JReport Designer from the Command Prompt window. This method is optional on some platforms (Windows for example) and preferred on others. Using command-line startup enables you to use command-line syntax options.
java -Dreporthome=path -classpath path jet.builder.JReport -vError -vDebug -hideBrs -log[:<file>] -help
The command line arguments for JReport Designer are described below. Please note that the setup process creates several startup batch files which may contain additional parameters.
- -Dreporthome
Specifiesthe directory where JReport Designer has been installed. This parameter is required. When you set the report home, upon launching, JReport will try to find jslc.dat and report.ini files under %ReportHome%\bin and check whether they are valid. jslc.dat is the License control file. Open report.ini, you will find configuration information, including the temp path, template path and the help path. JReport will use the temp path to export the temporary files. Therefore, make sure the temp folder specified in report.ini actually exists.
If JReport Designer has been installed under c:\JReport, then this parameter should be:
-Dreporthome=c:\JReport- -classpath path
Tells the Java interpreter the classpath. Usually append the JReport Designer lib path to the Java classpath, if JReport Designer was installed to c:\JReport and Java (JDK1.x.x) has been installed at c:\java, then this parameter should look like:
-classpath c:\java\lib\classes.zip;c:\jreport\lib\report.zip;- -Djava.compiler=NONE
Turns off just in time compiling which sometimes creates problems.- -Djrpt.outer=true
Enables JReport Engine to generate SQL statement with full outer join syntax instead of an abbreviated one.- -mx200m
Sets the maximum Java heap size.- Logging and debugging switches
You can use the following three command switches together to track debug and error information to console or log file.
You can specify the log file format, such as Text, or HTML. You can decide whether to append the log files to the existing file, or create a new file. You can even specify the log layout using the abundant options that JReport provides.
To do this, you need to edit the%REPORTHOME%\bin\LogConfig.propertiesfile. For detailed information on how to configure logging and debugging information, please read theLogConfig.properitesfile.
- -vError
Enables JReport Designer to output error messages to Console or log file (when used together with-log).- -vDebug
Enables JReport Designer to output debug messages to Console or log file (when used together with-log).- -log[:<file>]
Tells JReport Designer to output debug, error or other messages to the specified file. If no file specified, the file JReport.log will be used.- -help
Print the help message.