# Upgrading from a Previous Version

Upgrading a standalone JReport Enterprise Server and an integrated JReport Enterprise Server involves different processes while sharing some common steps. Both updated JReport Enterprise Servers require converting the report resources in the old version in order to comply with the new server version.

## Upgrading in a standalone environment

JReport Enterprise Server 9 provides two migration tools in `<install_root>\bin` folder, which can help you to convert all the resources on the previous version of JReport Enterprise Server before version 6.0. Resources the migration tools cover include the security information (realm, user, group, protection, and ACL), report resources (catalog and report sets), scheduled tables, completed tables, version and version tables, and other relevant information (such as fonts, NLS, and style groups).

For versions later than V6.0 (included), the upgrade is performed automatically by JReport Enterprise Server 9. You need only install JReport Enterprise Server 9 into the same directory as the old server version.

Note: When installing the JReport Enterprise Server 9 into the same directory as the old version, the report level resources in the old version will be maintained and not be replaced by the report resources of V9.

### Upgrading a version between V5.2 Build 590 (included) and V6 (excluded) to V9

You can make the upgrade using the migration tool MigrationV52.bat (MigrationV52.sh for UNIX) that is available in the `<install_root>\bin` folder. This tool is used to convert all the resources of the versions between V5.2 Build 590 (included) and V6 (excluded) to the resources of JReport Enterprise Server 9. If you install the new version to the same folder as the old one, the parameter can be omitted.

- Usage
  MigrationV52 [orgReportHome]
- Options
  - orgReporthome
    The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the reporthome of JReport Enterprise Server 9 will be used as its value.

Case 1: Installing JReport Enterprise Server 9 to a new folder (recommended)

1. Provided that the old JReport Enterprise Server is located in `C:\JREntServer595`. Install JReport Enterprise Server 9 to a new folder `C:\JReport\ServerV9`. DO NOT start the newly installed JReport Enterprise Server.
2. In the DOS window, switch to `<install_root>\bin`, and run `MigrationV52 C:\JREntServer595`.

Case 2: Installing JReport Enterprise Server 9 to the folder where the old version resides

1. Provided that the old JReport Enterprise Server is located in `C:\JREntServer595`. Install JReport Enterprise Server 9 to the same location. DO NOT start the newly installed JReport Enterprise Server.
2. In the DOS window, switch to `<install_root>\bin`, and run `MigrationV52.bat`.

### Upgrading a version earlier than V5.2 Build 590 (excluded) to V9

You can do the upgrade using the migration tool MigrationBV52.bat (MigrationBV52.sh for UNIX) that is available in the `<install_root>\bin` folder. This tool is used to convert all the resources of versions lower than V5.2 Build 590 to the resources of JReport Enterprise Server 9. If you install the new version to the same folder as the old one, the parameter can be omitted.

- Usage
  MigrationBV52 [orgReportHome]
- Options
  - orgReporthome
    The reporthome of the original JReport Enterprise Server. If the parameter is not provided, the reporthome of JReport Enterprise Server 9 will be used as its value.

Case 1: Installing JReport Enterprise Server 9 to a new folder (recommended)

1. Provided that the old JReport Enterprise Server is located in `C:\JREntServer580`. Install JReport Enterprise Server 9 to a new folder `C:\JReport\ServerV9`. DO NOT start the newly installed JReport Enterprise Server.
2. In the DOS window, switch to `<install_root>\bin`, and run `MigrationBV52 C:\JREntServer580`.

Case 2: Installing JReport Enterprise Server 9 to the folder where the old version resides

1. Provided that the old JReport Enterprise Server is located in `C:\JREntServer580`. Install JReport Enterprise Server 9 to the same location. DO NOT start the newly installed JReport Enterprise Server.
2. In the DOS window, switch to `<install_root>\bin`, and run `MigrationBV52.bat`.

## Upgrading in an integration environment

1. Suppose that you already have a standalone JReport Enterprise Server 9, whether it is installed directly or upgraded from a previous version. In this step you need not convert the old version reports.
2. Use the JReport Enterprise Server 9 to create a self-contained WAR/EAR file. For information on how to create the WAR/EAR, see Building a WAR/EAR file to include a self-contained JReport Enterprise Server.
3. Use the Java application server that integrates the previous version of JReport Enterprise Server to deploy the new self-contained WAR/EAR and update the old WAR/EAR with the new.

   By now, if the previous version of JReport Enterprise Server is later than V6.0 (included), the integrated JReport Enterprise Server has already upgraded to V9. But if the previous version is earlier than V6.0, go to step 4 and you need do further upgrade.

4. For a previous version between V5.2 Build 590 (included) and V6 (excluded): in the DOS window, switch to `<reporthome>\bin`, and run `MigrationV52.bat`.

   For a previous version earlier than V5.2 Build 590 (excluded): in the DOS window, switch to `<reporthome>\bin`, and run `MigrationBV52.bat`.