Index

Administrating JReport Enterprise Server

Introduction

The administration task in JReport Enterprise Server consists of five major parts:

  • Resource Management
  • Version Management
  • Security Management
  • Task Management
  • Server Data Management

Resource Management

Resources on JReport Enterprise Server are organized in a tree structure called a Resource Tree. The resource tree consists of folders under its root directory, and the resources reside in the folders. Only the resources that are organized in the resource tree can be accessed and queried by the client.

You can perform basic resource tasks, such as deploying, and deleting resources, getting resources from the real path, and more advanced tasks, such as changing resource and folder properties. Moreover, you can also manage the versions and secure your resources, which are respectively described in sections - Version Management and Security Management of this chapter.

Resource Overview

What is a Resource

Generally, a resource refers to report related material. To be exact, a resource in the JReport reporting system is actually a conceptual node, which holds a group of archive versions that can be processed or organized on JReport Enterprise Server. There are different types of resources, such as catalogs, reports, and report results. A resource can only hold versions of the same type.

Resource Tree

All the resources are organized in a folder-tree structure. JReport Enterprise Server defines an XML file called admin.xml, and the resource tree conforms to this file.

For example, your company has two departments - Support and Marketing.  Each department has its reports on their own machine. There are some report documents that are submitted by the departments located on the machine where JReport Enterprise Server runs. Now suppose you are the administrator, and you would like to organize these files and folders into the Resource Tree. The following diagram may help you to visualize the framework on which you should build the resource tree.

The resource tree consists of three layers: Folder layer, Resource layer, and Archive layer.

Folder layer: The basic resource tree element that builds the main framework for the resource tree. There are two built-in folders under the root of the resource tree -- Public Reports and My Reports. A folder can be mapped to a real file path.

Resource layer: An abstract layer, based on the Folder layer that hosts various types of archive versions and provides user access to the versions.

Archive layer: A concrete layer, where the archive versions reside for executable reports, report catalogs, and report results, that function as the leaves of the resource tree.

Public Reports and My Reports

There are two built-in folders under the resource tree root -- Public Reports and My Reports. You can create your own folders in either of them. The Public Reports folder and the My Reports folder cannot be deleted.

The Public Reports folder contains public report documents and executable reports, and can be accessed by everyone. All folders except for the personal folders are public folders.

The My Reports folder is a personal folder. It contains personal report documents and executable reports. Each user has one personal folder, specified by the administrator when the user account is created. The My Reports folder can only be accessed by its owner, and the user has full control over his/her personal folder. This folder is the default output location for reports run by the user.

Deploying Resources

Before you can perform any tasks on JReport Enterprise Server, you need to have your own resources deployed and organized. There are several ways to deploy resources (catalogs, reports, or folders) that are located outside JReport Server.

Deploy reports using JReport Designer

You can directly deploy your reports or catalogs to JReport Enterprise Server from JReport Designer.

For information on how to deploy reports from JReport Designer, please refer to JReport Designer Help Documentation (User's Guide | Deploying Resources From JReport Designer) or visit our website for the chapter: Deploying Resources From JReport Designer.

Deploy resources from local or remote computer

You can deploy three types of resources from a local or remote computer. They are reports, catalogs, and folders. Use local deploy if you want to deploy resources on the machine where JReport Enterprise Server runs. If you want to deploy resources from a remote machine to the server, use remote deploy instead.

To deploy resources from a local computer,

  1. Select the folder in the resource tree where you want to deploy resources, then select Local Deploy.

  2. Select a resource type from the drop-down list. Choose from the following:

    Report
    Catalog
    Folder
    Folder with Contents
    Catalogs, Reports and Folders in Folder
    Catalogs and Reports in Folder

    Please make sure the resource type is consistent with the resource real path.
  3. Click the Browse... button to specify the folder from where the resource is to be deployed.
  4. Specify a name of the resource in JReport Server in the Resource Name box. This name is required and is the display name the user will see to access the resource.
  5. Type a brief description to describe the resource in the Description box.
  6. Type a real path in the Real Path box. If no path is specified, the default path will be used.

    A real path is a physical path in the directory structure on the system where JReport Server is running, for example, in a Windows system, c:\Temp.

    If you are deploying a folder in a clustered environment, please make sure you check the Map shared disk option. The folder will be mapped instead of copied.
  7. To apply the archive policy to the resources you are deploying, check the Archive policy option.

    If you want the resources to have multiple versions, check the Archive as a new version option, and then specify a maximum number of versions that will be saved. The default value is 0, which means an unlimited versions can be saved.

    Please note that a folder by itself does not have versions, the archive policy specified for a folder actually applies to (is inherited by) the resources within the folder.
  8. To enable user permissions, check the Enable user permissions option. Permissions that can be specified to a user or role include: Visible, Read, Write, Delete, Execute, Schedule, and Grant.

    Note: If there are a lot of users or roles, the element of User Permission would have a large number of contents which make the whole HTML page very large. To avoid this, users could set the value of an option, called web.page.option.use_permission_dialog, to be true in the file of server.properties. Then, when you restart the server, the user permissions option on the interface will become hyperlinked. Clicking this link, a User Permissions HTML page will pop up.

  9. Click the Browse button to specify a font directory for the resource.
  10. Click the Browse button to specify a style directory for the resource.
  11. If you want to use advanced deploy, go to next step, otherwise go to step 18.
  12. Click the Advanced Deploy button. All sub-folders and reports contained within the resource folder will then be displayed in advanced deploy mode.
  13. Change the resource names if necessary in the Resource Name box by clicking the icon or just enter a new name in the box.

  14. Give a brief description for the resource in the Description box.

  15. Click the icon to apply an archive policy to each folder or report.

  16. Check the box ahead of the folders or reports to have them deployed.

  17. Click Submit to start deploying the resources.

    To clear all the filled contents and reset this tab to its original status, click Reset.

Notes: When deploying resources from a remote computer, the process is similar to that for a local deploy. However, there are differences, these are:

Parameter Description
%JAVAHOME% The Java SDK install root.
%DEST_JAR_FILE% The destination file path and file name. The .jar file will be generated to the path you specify here, using the file name you provide.
%SOURCE_RESOURCES% The source file path and file name. Please note that specifying a path for this parameter will cause the generated jar file to contain the same path information. For example, when you extract the jar file that was created using myReports\*.* for this parameter, the files will be extracted to a folder called myReports. JReport Server is not able to import a compressed file that contains the path information, so please do not specify a path for this parameter, just specify the resource files only.


To generate a jar file containing no path information, switch to the source folder, and then do the compression.

For example,

C:\myReports>C:\j2sdk1.4.1_02\bin\jar -cvfM c:\temp\aa.jar .

The jar file will be generated to c:\temp, as aa.jar, compressing all the files under c:\myReports, containing no path information.

Always use this method if the folder you are going to compress contains reports with non-ASCII names such as Chinese and Japanese characters in the name.

 

To deploy resources from a remote computer,

  1. In the folder where you want to deploy resources, click Remote Deploy.

  2. Click the Browse... button to specify the zipped file from which the resource comes.
  3. Specify a name of the resource in JReport Server in the Resource Name box. This name is required and is the display name the user will see to access the resource.
  4. Type a brief description to describe the resource in the Description box.
  5. Type a real path in the Real Path box. If no path is specified, the default path will be used.

    A real path is a physical path in the directory structure on the system where JReport Server is running, for example, in a Windows system, c:\Temp.
  6. To apply the archive policy to the resources you are deploying, check the Archive Policy option.
  7. Check the Deploy files and folders in the zipped file to /USERFOLDERPATH/admin without creating a folder with the name of the zipped file box if you want this option.
  8. Click Submit to start deploying the resources.

    If you want to use advanced deploy, click the Advanced Deploy button. All sub-folders and reports contained within the resource folder are displayed in advanced deploy mode.

Deleting Resources

To delete a resource or folder, locate the folder that contains the resource or folder you want to delete, click the corresponding Delete link in the Control column.

Notes:

Getting Resources from the Real Path

You can not only use the deployed resources described above, but also those named as "Dynamic Resources" obtained from the real path. To do so, you need to specify a real path for a virtual folder in its Properties link in the Control column. Then, you can add or remove resources into or from the Server by adding or removing them into or from the real path directory. This is very convenient if you are creating dynamically created or modified catalogs and reports using the Designer API and Catalog API. It is much easier to just modify the catalog and reports directory in their physical location in the directory rather than modify them in a different location then re-deploy them before they can be used.

Notes:

How to Use Resources from the Real Path

To use resources from the real path,

  1. Make sure that the Enable Resource from Real Path check boxes both under the Advanced tab of Configuration on the JReport Admin Console (8889) and under the Properties link of the folder you want to use in the Control column on the Server home page (8888) are checked. In the follwing example, we will set the folder /hsqlDemo as a real path resource so all objects which are deployed there will be dynamic resources.

    Note: On the admin page (8889), this function can be realized only after the server has been restarted.
  2. Specify a real path for the demo virtual folder "/hsqlDemo" as "C:\jrentserver\reportbak" to use the dynamic resources.
  3. Click Submit to save the changes; otherwise, click Cancel.

  4. In the windows directory C:\jrentserver\reportbak, create three sub directories C:\jrentserver\reportbak\report1, C:\jrentserver\reportbak\report2, C:\jrentserver\reportbak\report3 and copy some reports and catalogs into them.
  5. On starting the server, click the virtual folder /hsqlDemo, and you will now see the three sub folders: report1, report2, and report3 within it, including the reports and catalogs that were copied there before.
  6. Now you can perform operations on the dynamic resources, including running, advanced running, scheduling, viewing versions and setting properties, but you can only delete the reports from the real path rather than deleting directly from Server UI.

Note: After you use the dynamic resources, under certain special conditions, some used data, invalid dynamic nodes, will be generated in the server databases. In order to delete the invalid dynamic nodes, administrators can perform the corresponding option on 8889 to clear these nodes from the databases. For details about checking the system database and clearing unused data from databases, please refer to Server Data Management/Clearing Unused Nodes from the System Database.

Setting Real Path for Public Reports at Server Startup

JReport Server provides a method you can use to specify a real path for the server’s root note, Public Reports, when you start the server.

To do this,

  1. Create a property file called install.server.properties, and save it to %install_root%\bin. The contents in it are:

    server.enableDynamicResource=true
    server.publicReportsRealPath=C:\PublicReports

    The value of server.publicReportsRealPath can be any path in your file system.
  2. Start JReport Enterprise Server. The server will work as follows:
    1. The values in server.properties under %install_root%\bin will be loaded.
    2. The file install.server.properties under %install_root%\bin will be read, and
      • The value of the property server.enableDynamicResource in server.properties will be replaced by the value in install.server.properties;
      • The value of the property server.publicReportRealPath, in this example, it is C:\PublicReports, will be recorded into the server database.
    3. install.server.properties will be deleted automatically when the above settings are completed.
  3. Access the server, you will find that:
    • On the administration page of the server (port 8889), the option Enable Resource from Real Path of the Advanced tab on the Configuration page has been checked.
    • On the properties page of the Public Reports, the option Enable Resource from Real Path for it has been checked, and the real path is C:\PublicReports, which is specified in the install.server.properties file.

Notes:

Changing Resource and Folder Properties

To change the properties of a resource or folder, locate the folder that contains the resource or folder you want to change, and click the Properties link in the Control column.

Resource real path

You can set the resource real path for a folder. The real path of a folder is used to provide path information for JReport Enterprise Server to export report results to a correct location on disk.

When you export your report result to disk, you will be prompted to provide the path and file name information for the result file. The path you type in the box should never be an absolute path, for instance, strings such as c:\foldername\filename are invalid. Please use the path in the resource tree instead, such as /foldername/filename. In the path information you provide, the first slash mark (/) refers to the Public Reports folder in the resource tree, and the folder name (foldername) refers to a folder that actually exists in the resource tree.

The folder real path you specify should be correct and actually exist on disk. Otherwise, when you export report result to disk, JReport Enterprise Server will fail when generating files and prompt you with the information that the real path does not exist.

Notes:

Index