- Home
- DevShare
- Forums
- Wiki
- Products & Services
- Downloads
- Documentation
- Webinars
- Store
- Blog
BIRT reports often reference other files, called resources. This section discusses how to publish your resources to iServer Express. This section is a bit more detailed than others because we describe how to deploy your own resources in addition to showing a simple example.
Contents |
BIRT reports can be self-contained files or they can reference resources stored in other files. BIRT resource files include the following:
BIRT resource files are placed into the "/Resource" folder on the server. Problem-free uploading requires that you understand the relationship between the resources in your development environment and the copies you upload to iServer Express. Follow these steps for a trouble-free deployment:
This introduction shows how to use Management Console to upload resources so that you can get started quickly. In practice, you'll want to use an Actuate BIRT Report Designer (described below) to perform resource upload with one click.
BIRT locates resources using the resource directory set in preferences. The preferences dialog is available from the top Eclipse menu in Window → Preferences. Within the preferences tree, look in Report Design → Resource. The directory shown here is your design-time resource directory:
The design-time Resource folder shown here corresponds to the iServer Express /Resource folder.
There are two possibilities for this setting:
The default setting, shown in the screen shot above, is to store resources for each BIRT project in the project folder itself. For example, if you have an "Accounting" project, then resources used by that project are stored in the "Accounting" project folder, while "Billing" project resources are located in the "Billing" project, and so on.
When you upload resources to iServer Express, the resources for all your projects are placed together in the iServer Express /Resource folder. Because of this, you must ensure that resource file names are unique across all projects. Ways to ensure unique names include:
Some people divide their BIRT applications across multiple Eclipse projects. In this case, resources shared across projects, or shared within a project, are placed in a single central location. The Resource folder in the preferences dialog will point to a specific location on your file system such as "/projects/shared-resources". Again, the designer's Resource folder corresponds to the /Resource folder on iServer Express. But, in this case, all resources are already combined at design time into a single location and so the iServer Express /Resource folder will contain a copy of of the design Resource folder.
Smaller projects may place all resources directly in the designer's Resource folder. Larger projects may choose to create folders to help organize resources. For example, a project might define three resource folders:
Depending on how you've got your Resource folder set in the designer, this structure could appear within each project, or in a single shared location. In either case, you will reproduce this structure, subfolders and all, within the iServer Express /Resources folder. For example, if you had the folders above, then you would create a folder "/Resources/images" on iServer Express to hold your images.
Let's use an example report to make the following steps more concrete.
You should now see the following:
This project contains a report and one of each type of resource file, organized into folders. The example assumes you are using the default Resource folder setting, "Current Project Folder". If you have a central shared location, you must copy the resource files into that location.
You should see the following:
Each line verifies that BIRT has found a different kind of resource. (If your output looks different, or if an error appears, verify that your Resource folder is set as described above.)
There are minor differences between the way resources are handled in Eclipse and Actuate BIRT versions. If you created your reports in Eclipse BIRT, it is a good idea to take a quick look at the resources used by your report before you upload it to prevent surprises later. In particular, review reports that reference JavaScript source files or Java event handler JAR files before you upload them. See Toubleshooting BIRT Resources for details. (This step is not needed for reports created in the Actuate BIRT designers.)
The example report organizes resources into folders. We must mimic the project's folder structure within the iServer Express Resources folder.
Navigate to the /Resources Folder.
machine-name > Home > administrator.
You should see something like the following:
iServer Express comes with several resource files pre-installed. We will add additional resources needed by the example report. The first step is to create folders within /Resources that correspond to the folder structure. The example report contains four folders: "Images", "Libraries", "Messages" and "Scripts." Let's create them.
The following dialog appears:
The Resource folder should now appear as follows:
Now we can upload the resource files themselves. There are two ways to upload resources: using the iServer Express Management Console, and using the publish feature of the Actuate BIRT designer. We will use the Management Console approach here. We will upload the resources needed for the sample report.
At this point, this is what you should see:
The file properties dialog appears:
The next step is to upload the sample report itself. We will place it in the user's home folder.
Switch to the current user's home folder:
machine-name > Resources
Upload the sample report:
The final step is to test the report using iPortal for iServer Express.
You will see the user's home folder that contains the sample report.
You should see the same output as you saw in the designer:
Not very pretty, but it does demonstrate that BIRT was able to find each kind of resource file.
As you maintain your reports, you may find the need to replace resource files. iServer Express supports file versions. However, the Java infrastructure that BIRT uses does not recognize versions. Instead, if the Resource folder on iServer Express contains files with multiple versions, BIRT always uses the latest version. To ensure that new resources work as expected, keep only one version of each resource on iServer Express. To do this, choose the "Replace the latest version" option when uploading:
If you replace a JAR file, you must stop, then restart iServer Express for BIRT to pick up the new version. Use the Services tool on Windows.
The above procedure has assumed you are new to Actuate and are using the open source Eclipse designer. Actuate offers enhanced versions of the BIRT designer that make it much easier to upload BIRT reports and resources. Actuate offers two designers: BIRT Report Designer and BIRT Report Designer Professional. The Actuate BIRT designers provide many advantages beyond Eclipse BIRT. Two are of special interest when working with BIRT Resources:
Product documentation is available in two places: