JasperReports Server CP Admin Guide PDF
JasperReports Server CP Admin Guide PDF
JasperReports Server CP Admin Guide PDF
http://www.jaspersoft.com
Copyright 2005-2016 TIBCO Software Inc. All Rights Reserved. TIBCO Software Inc.
This is version 0616-JSO63-01 of the JasperReports Server Community Project Administrator Guide.
TABLE OF CONTENTS
Chapter 1 Overview of JasperReports Server Administration 9
1.1 Overview of the Repository 10
1.1.1 Folder Structure 10
1.1.2 Resources 11
1.1.3 Browsing and Searching 11
1.2 Overview of Users and Roles 12
1.2.1 Administering Users and Roles 12
1.2.2 Delegated Administration 13
1.3 Overview of Security 13
1.4 Administrator Login 14
1.4.1 JasperReports Server Heartbeat 15
1.4.2 Administrator Email 15
1.5 Administrator Pages 15
Chapter 2 User and Role Management 17
2.1 Managing Users 17
2.1.1 Viewing User Properties 18
2.1.2 Creating a User 18
2.1.3 Editing a User 19
2.1.4 Enabling or Disabling Multiple Users 20
2.1.5 Deleting One or More Users 21
2.2 Managing Roles 21
2.2.1 Viewing Role Properties 21
2.2.2 Creating a Role 22
2.2.3 Assigning Users to a Role 23
2.2.4 Deleting One or More Roles 23
2.3 Managing Attributes 24
2.3.1 Referencing Attributes 24
2.3.2 Attribute Hierarchy 24
2.3.3 Attribute Encryption 25
2.3.4 Attribute Permissions 25
2.3.5 Managing Server Attributes 26
2.3.6 Managing User Attributes 27
While the Ad Hoc Editor lets users create simple reports, more complex reports can be created outside of the
server. You can either use Jaspersoft Studio or manually write JRXML code to create a report that can be run
in the server. We recommend that you use Jaspersoft Studio unless you have a thorough understanding of the
JasperReports file structure.
You can use the following sources of information to learn about JasperReports Server:
Our core documentation describes how to install, administer, and use JasperReports Server and Jaspersoft
Studio. Core documentation is available as PDFs in the doc subdirectory of your JasperReports Server
installation. You can also access PDF and HTML versions of these guides online from the Documentation
section of the Jaspersoft Community website.
Our Ultimate Guides document advanced features and configuration. They also include best practice
recommendations and numerous examples. You can access PDF and HTML versions of these guides online
from the Documentation section of the Jaspersoft Community website.
Our Online Learning Portal lets you learn at your own pace, and covers topics for developers, system
administrators, business users, and data integration users. The Portal is available online from Professional
Services section of our website.
Our free samples, which are installed with JasperReports Library, Jaspersoft Studio, and JasperReports
Server, are documented online.
This administrator guide describes features that are only available to users who have administrator roles.
Many of the configuration procedures also assume you have access to the installed files on the host
computer.
This section describes functionality that can be restricted by the software license for JasperReports
Server. If you don't see some of the options described in this section, your license may prohibit you from
using them. To find out what you're licensed to use, or to upgrade your license, contact Jaspersoft.
JasperReports Server is a component of both a community project and commercial offerings. Each integrates the
standard features such as security, scheduling, a web services interface, and much more for running and sharing
reports. Commercial editions provide additional features, including Ad Hoc charts, flash charts, dashboards,
Domains, auditing, and a multi-organization architecture for hosting large BI deployments. This guide
documents the features of the community project.
In general, we recommend that you avoid placing resources directly in the root. Instead, use folders for various
resource types, as in the sample data. The Themes folder contains files that control the look and feel of the user
interface, as described in Chapter 6, Themes, on page97.
1.1.2 Resources
Resources are stored in the repository and used as input for creating reports and performing analysis. Some
resources, such as images, fonts, or JRXML files created in Jaspersoft Studio, are uploaded from files. Others,
such as data sources and Domains, are created in JasperReports Server itself. Of course, dashboards, data views,
and reports can also be saved in the repository to be run as often as needed. Output such as PDF or HTML can
be saved in the repository as well.
All resources, including folders, have unique IDs, names, and optional descriptions. The ID of a resource, along
with the ID of its enclosing folders create the path used to reference that resource. The path of a resource is also
called its repository URI (Universal Resource Indicator). The name and description appear in the user interface
when you browse or search the repository.
Resources are stored in an internal format not accessible to users or administrators. Any resource can be exported
with the js-export utility, but the resulting files are for backup or transfer to another JasperReports Server
instance and cannot be modified.
JasperReports Server restricts access to folders and resources based on organizations, permissions, user names,
and roles. For more information, see Chapter 3, Repository Administration, on page31.
The sample data includes dashboards, reports, Domains, data sources, and many of their components, such as
input types and image files. Each type of content is stored in a separate folder, making it easy to locate. The
Supermart Demo folder contains a complete example of dashboards, reports, and resources for various business
scenarios in a fictional grocery store company.
Searching - Enter a search term in the search field at the top of any page, or select View > Search Results.
The search results page displays a search field with the current search term at the top of the Repository
panel. The search applies to resource IDs, names, and descriptions. Use the filters in the left-hand panel to
refine your search.
Authentication Authentication is the process of restricting access to identified users. Users must log
in with their user ID and password so that they have an identity in JasperReports
Server. The server stores user definitions, including encrypted passwords, in a
private database. Administrators create, modify, and delete user accounts through
the administrator pages, as described in 2.1, Managing Users, on page17.
Password policies Every company must establish a password policy that weighs its security risks
against the convenience of its users. JasperReports Server supports many different
password policies such as password expiration, reuse, and strong patterns. This
configuration is described in the JasperReports Server Security Guide.
External authentication External authentication uses centralized identity services such as LDAP (used by
Microsoft Active Directory and Novell eDirectory), Central Authentication Service
(CAS), Java Authentication and Authorization Service (JAAS), or SiteMinder. For
more information, see the JasperReports Server External Authentication Cookbook.
Application Security System admins who install and maintain enterprise software know they must protect
their servers against hackers. JasperReports Server protects your data against
intruders with many protocols and tools, such as HTTPS, encryption, CSRF
prevention, and input validation against cross-site scripting and SQL injection. For
these topics and others, see the JasperReports Server Security Guide.
Roles JasperReports Server also implements roles that can be assigned to any number of
users. Roles let administrators create groups or classes of users that are granted
similar permissions. A user may belong to any number of roles and receive the
privileges from each of them. Administrators create, modify, and delete roles
through the administrator pages, as described in 2.2, Managing Roles, on
page21.
Resource permissions Administrators can define access permissions on every folder and resource in the
repository. Permissions are enforced when accessing any resource either directly
through the repository interface, indirectly when called from a report, or
programmatically through the web services.
Permissions can be defined for every role and every user, or they can be left
undefined so they are inherited from the parent folder. To restrict access or hide
resources such as database connections, the administrator can set no-access or
execute-only permission. For more information, see 3.4, Repository
Permissions, on page41.
Menus and pages The menus that appear in JasperReports Server depend on the user's roles. For
example, only users with the administrator role can see the Manage menu and
access the administrator pages. By modifying the server's configuration, you can
modify access to menus, menu items, and individual pages. Refer to the
JasperReports Server Community Project Source Build Guide and JasperReports
Server Ultimate Guide for more information.
Attributes Attributes are name-value pairs associated with a user, organization, or server.
Attributes can be used to restrict or enable a user's access to data in several ways.
See 2.3, Managing Attributes, on page24.
Administrators must keep security in mind at all times when managing user, roles, and resources, because
effective security relies on all of them working together.
For security reasons, always change the default administrator password immediately after installing
JasperReports Server. For instructions, see 2.1.3, Editing a User, on page19.
For more information about options on the Login page and logging in with multiple organizations, see the
JasperReports Server User Guide.
The first time you log in as an administrator, you may be prompted to opt-into the Heartbeat program. You
should also set the administrator passwords and email.
This is also a good time to change the default passwords on the jasperadminaccount.
To set the email and passwords on the administrator account, edit the user account information as described in
2.1.3, Editing a User, on page19.
The About TIBCOJasperReports Server link in the footer of all pages displays the product version along
with the software build.
Default Password
User Name Description
(case sensitive)
You should advise your users to change their passwords regularly. To configure periodic expiration of
passwords, refer to the JasperReports Server Security Guide.
The columns in the Users panel list the user ID and the user name of each user in the server
3. To locate a user:
Browse for users Scroll through the list of users if it is too long to fit on your screen.
Search for a user Enter a search string in the Search field of the Users panel. The search results show
all user ID or names that match the search string.
4. Select a user account to view its Properties in the right-hand panel.
User status can be Enabled or Disabled; disabled users are displayed in gray text in the Users list. For
convenience, the role names link to the role management page for each role. For information about
attributes on the user, see 2.3.6, Managing User Attributes, on page27.
5. Edit the user's properties as needed. You can't edit the user ID; it always has the value defined when the
user was created originally.
6. To assign or remove roles from the user, select the roles, and use the arrow buttons between the Roles
Available and Roles Assigned lists.
7. For information about attributes on the user, see 2.3.6, Managing User Attributes, on page27.
8. Click Save to keep your changes.
9. In the Properties panel, click Login as User to test the user's permissions, as explained in 3.4.7, Testing
User Permissions, on page46.
Logging in as another user is also necessary when you are maintaining resources that use absolute
references in the repository. For more information, see Referencing Resources in the Repository on
page1.
3. In the Users list, use Control-click and Shift-click to make multiple selections. If the User list is too long,
enter a search term to find users and enable or disable them individually.
4. Click Enable or Disable in the menu bar.
Role Description
ROLE_USER Required to log in. This role is automatically assigned to every user in the
server. It's a special system-level role.
Never delete this role, it's required to create users and allow them to log in.
When you need to define permissions for sets of users, administrators can create new roles and assign them to
users. Users can belong to any number of roles and each can be used for access to different resources.
3. To filter the list of roles, enter a search string in the search field of the Roles panel. The search results show
all of the roles whose names contain the search string. If necessary, scroll through the new list or refine your
search.
4. Select the role in the Roles panel. The role's properties appear in the Properties panel.
The Properties panel shows the role name and the users assigned to the role. You can enter a search term to
find users in the list. Hover over a user ID to see a user's full name, as shown in the figure.
4. Enter the name of the role. The role name is also the role ID and does not accept spaces or special
characters.
5. Click Add Role to create the role.
The new role is included in the Roles panel. If you want to assign users to the role, click Edit in the
Properties panel of the new role.
5. Enter a different name to change the role name throughout the server.
Permissions in the repository that use the role name are automatically updated. However, role names in
security files for Domains and OLAP are not updated with the new role name and may cause a security
risk. If you use security files for Domains or OLAP, do not change role names without verifying the files as
well. For more information, see the JasperReports Server User Guide.
6. To assign or remove role users, select the users, and click the arrow buttons between the Users Available
and Users Assigned lists. You can enter a search term to find users in the lists. Hover over a user ID to see a
user's full name, as shown in the figure.
7. Click Save to keep your changes, or Cancel to quit without saving.
The permission feature of attributes is designed to work with multiple organizations in commercial
editions of JasperReports Server. The feature is enabled in all editions of the server, but has limited use
in the Community Project edition.
With hierarchical values, attributes with same name but different values may be defined at several levels and on
many users. Each attribute is a distinct attribute definition, but the hierarchical value referencing takes into
account the level and the presence of the definition for every given user.
To help administrators define attributes on users, the UI displays all attributes that are visible in the attribute
hierarchy. If an attribute is defined at the server level, its hierarchical value is shown at the user level, and the
attribute is called inherited. This allows the administrator to see all hierarchical values that are in effect in lower
levels, either to override them in the hierarchy or leave them as inherited.
Categorical and hierarchical approaches usually involve different strategies for defining and naming attributes.
When using categorical values, you must ensure that each and every user has the attribute defined, and you
must handle the case when it is accidentally undefined, such as a new user. When using hierarchical values, you
define attributes with the same name at different levels, such that each user may have a custom value, but then
the server level provides a default value for all users. Each strategy is useful for different applications,
depending on your needs to access and protect data. However, both strategies can co-exist and be used by at the
same time by different resources, as long as the names of attributes used in each strategy or each resource are
kept distinct.
Attribute permissions were designed to work with multiple organizations in commercial editions of
JasperReports Server. The feature has limited use in the Community Project edition.
Execute Only Inthe Community Project edition, this permission has no effect.
No Access The attribute is disabled and its value cannot be referenced. When referenced, an attribute with
no-access permission returns an error.
3. To create a new server-level attribute, click Add new attribute. Enter the attribute name and value, as well
as an optional description. If desired, set the permission from the drop-down list and select the Encrypt
check box. Click OK to close the dialog and then click Save to submit the new attribute.
4. To modify an attribute, click the edit icon . In the edit dialog, modify the desired fields. Click OK to
close the dialog and then click Save to modify the attribute.
You can also modify the attribute's permission and encryption by using the drop down and check box in its
table row. After confirming any changes, click Save to make them take effect.
When modifying an attribute, be aware of the following:
Changing the name of an attribute is equivalent to deleting the original attribute and adding a new
attribute with the same value. Because this may impact features that reference the attribute, you are
asked to confirm the name change.
Be aware that changing the encryption or permission of an attribute can impact the visibility of an
attribute and the features that might rely on referencing its value. Again, you are asked to confirm the
change.
Removing encryption does not decrypt an encrypted attribute. To safeguard encrypted values, removing
the encryption on an attribute also erases its value. You should give the attribute a new value by
clicking the edit icon.
5. To delete an attribute at the server level, click the delete icon in the attribute row and confirm the
operation. Because this may impact features that reference attributes, you are asked to confirm the deletion.
Click Save to make the deletion take effect.
4. To create, modify, or delete the attributes on a user, click Edit in the right-hand column, then select the
Attributes tab.
5. You can filter attributes in the list to include only the inherited attributes or only the locally defined (not
inherited) ones.
6. To create a new user attribute, click Add new attribute. Enter the attribute name and value, as well as an
optional description. If the attribute value should not be visible to other administrators, select the Encrypt
check box. Click OK to close the dialog and then click Save to submit the new attribute.
7. To modify an attribute, click the edit icon . In the edit dialog, modify the desired fields. Click OK to
close the dialog and then click Save to modify the attribute.
You can also modify the attribute's encryption by using the and check box in its table row. After
confirming any changes, click Save to make them take effect.
When modifying a user attribute, be aware of the following:
Inherited attributes belong to the server level and are shown at the user level to display the hierarchical
attribute values. Any modification to an inherited attribute actually creates a local attribute definition
with the modified parameters. In the hierarchy of attributes, the new attribute takes precedence over the
previously inherited attribute.
Changing the name of a locally defined attribute is equivalent to deleting the original attribute and
adding a new attribute with the same value. Because this may impact features that reference attributes,
you are asked to confirm the name change.
Removing encryption does not decrypt an encrypted attribute. To safeguard encrypted values, removing
the encryption on an attribute also erases its value. Click the edit icon to give the attribute a new
value.
8. To delete a user attribute, click the delete icon in the attribute row and confirm the operation. Because
this may impact features that reference attributes, you are asked to confirm the deletion. Click Save to make
the deletion take effect.
When deleting a user attribute, be aware of the following:
Upon deletion, some attributes remain in the list as inherited attributes. This indicates that the local
definition of the attribute was deleted, but another attribute with the same name exists at the server
level.
You cannot delete an inherited attribute because it belongs to the server level. To remove an inherited
attribute, you must delete it or set its permission to No Access at the server level.
JasperReport A JasperReport combines a JRXML file, a data source, and optional components
(JRXML report) such as input controls. Depending on the use case, both users and administrators
create JasperReports in the server. For more information, see 3.2, JasperReport
Structure, on page33. Procedures for adding reports to the server are described
in the JasperReports Server User Guide.
Content resource Report output of any format, either from running a report in the background or from
scheduling a report. A content resource is a simple file that the repository allows
users to view or download.
Data source A connection that points to a database or other data store. Data sources define
where data is stored for reporting. There are several types of data sources, based
on the type of connection or location of the data: JDBC, JNDI, and several others.
Only administrators may create data sources. For more information, see Chapter 4,
Data Sources, on page47.
Query A database query string, for example in SQL. The JRXML doesn't necessarily
include the query, in which case, you must define a query resource for use in the
JasperReport.
Input Control A complex type that specifies the values users can input for a report and how the
input field appears when running the report, for example radio buttons or check
boxes. Input controls depend on datatypes or lists of values to specify the format of
the input.
Datatype A basic resource that defines the format for input values, for example text, number,
or date. A datatype may also specify a valid range for the input value.
List of Values A basic resource that defines a list of arbitrary labels for input. Each label is
associated with a value that can correspond to your data. For example, the Month
Names List in the sample data associates the name of each month with a value 1 to
12.
File A resource that stores a file in the repository, usually as part of a report, such as a
JRXML file or image logo. The supported file formats are listed in Table 5-3, File
Resource Types, on page91.
Administrators and users can also manage OLAP resources in the repository, if their license supports Jaspersoft
OLAP. For more information about OLAP and Mondrian resources, see the Jaspersoft OLAP Community
Project User Guide.
Mondrian XML/A Source A server-side XMLA source definition of a remote client-side XML/A connection.
OLAP Client Connection Specifies how to retrieve data for an OLAP view. An OLAP client connection is
either a direct Java connection (Mondrian connection) or an XML-based API
connection
(XML/A connection).
OLAP View If you implement Jaspersoft OLAP, a view of multidimensional data based on an
OLAP client connection and an MDX query. Like JasperReports, OLAP Views are
collections of individual resources that define how to access and present the data.
In versions of JasperReports Server before 5.5, the JasperReports used the repo:syntax. As of 5.5, this is no
longer necessary, and regular file paths are recognized and managed within the repository.
When you upload your JRXML to the repository, your file references become valid repository references, and
you can store all your resources in well-known locations in the repository. This simplifies the process of
uploading your reports, because you don't have to upload the resources each time. Also, you can manage these
resources either through Jaspersoft Studio, the JasperReports Server user interface, or the server's REST API. For
example, when you update a logo image, all reports that reference that resource display the new logo.
When you upload a JRXML with an indirect reference, the server prompts you to provide the resource. You
have two options:
Create a new resource, in this case by uploading an image that becomes part of the JasperReport. This is
called a local resource. You can't access this resource from elsewhere in the repository, it exists only within
the JasperReport.
Select a resource from the repository. This is called an external reference because it is external to the
JasperReport. Any number of reports can link to the same external resource, and the resource can be
managed independently of them.
While indirect references require slightly more work than absolute references in the JRXML, the server manages
the dependency. Local resources exist as part of a JasperReport, and external references cannot be deleted until
they are no longer referenced.
In cases where you don't want to reference existing resources, local resources allow reports to be highly
customized and self-contained. A local resource defined inside the JasperReport has all the same properties as a
repository resource, but it's not accessible in the repository. Users must edit the JasperReport to access any
resources it defines locally.
Indirect references are used implicitly in several other cases when you define a JasperReport:
The main JRXML itself is either a local resource created by uploading a file or an external reference to an
existing JRXML file resource in the repository.
Every report must have a data source, and JasperReports Server gives you the option to either create a new
local resource or use an external reference to an existing data source.
Every report must also have a query that matches its data source. You may choose to create a local query
resource or use an external reference to an existing query.
Parameters in a report are implicitly handled as an indirect reference to an input control. For every parameter
named in your main JRXML, you must define an input control either as a local resource or external
reference.
Every level of indirect referencing is independent of the other. For example, when creating a JasperReport, you
may choose to create an input control as a local resource, but that input control may have an external reference
to its datatype. The server still manages the dependency between the local input control and the datatype
resource in the repository.
Local resources and external references are used by several resources, for example when creating input controls,
query resources, Domains, and OLAP resources.
If you have write or administer permission as shown in the figure, you can also edit the name and description of
the resource. For some operations such as export, you need the path, also called repository URI, which you can
copy from this dialog.
To create a folder:
1. Log on as a user who has write permission to the parent folder.
2. Select View > Repository and locate the parent folder in the Folders panel.
3. Right-click the parent folder and select Add Folder from the context menu. The Add Folder dialog
appears.
4. Enter the folder name and, optionally, a description, then click Add.
The folder is created in the repository. The name appears in the hierarchy of folders. The description is
visible only when viewing the properties of the folder, as shown in Figure 3-1.
New folders and their future contents inherit the permissions of their parent folders. Users with
Administrator permissions can change permissions folders, as described in 3.4.6, Setting Permissions, on
page44.
Most resources are created through the Add Resource menu item on the context menu for folders in the
repository. In the following figure, you can see the full menu and submenu with all the resources administrators
can create:
For every resource you create, you must specify a name and resource ID for referencing the resource in the
repository. Each wizard also has one or more pages for specifying the values and controls specific to the
resource.
New resources inherit the permissions of the folder in which they are created. Administrators can change
the permissions on the new resource, as described in section3.4.6, Setting Permissions, on page44.
You can change the folder or resource's name and description, but not the ID; the ID is permanent once the
resource is created.
4. Click Submit to save your changes.
The moved objects inherit their permissions from the destination folder; they do not keep the permissions
they had before the move. If you want the objects to have other permissions, you can set new permissions
after the move (see 3.4, Repository Permissions, on page41).
4. Right-click the destination folder and select Paste in the context menu (write permission is required on the
destination folder).
Alternatively, you can drag to move the selected resource or folder to the destination folder. To copy, press
and hold the Ctrl key then click and drag. When dragging resources, the destination folder is highlighted in
blue if you have write permission to it.
JasperReport To change the layout of an interactive report, users may Run the report, then
change the column filters or sorting. Users may save the report, either by
overwriting the original or as a new copy, depending on their permissions.
To change the definition of a report, right-click the report resource and select Edit.
Then you can change the data source, input controls, or file resources referenced
in the JasperReport. For more information, see 3.2, JasperReport Structure, on
page33.
Content Resource A content resource is report output that is stored as a file stored in the repository.
These files cannot be edited, only downloaded or deleted.
Data Source Administrators only: right-click the data source, then select Edit from the context
menu. For more information, see Chapter 4, Data Sources, on page47.
Query Right-click the resource, then select Edit from the context menu on these
resources. You edit these resources in the same dialog you used to create them.
Input Control For more information, see Chapter 5, Other Resources in the Repository, on
page73.
Datatype
List of Values
File
The repository won't allow you to delete resources currently referenced by other resources. For example, an
input type used by a report cannot be deleted as long as the report still references them.
To find the resources that reference the one you want to delete, you need to look at each report that you suspect
of referencing it. When you edit the definition of a JasperReport, you can see the resources it references. Then
you can either remove the reference from the resource or delete the entire resource containing the reference.
No Access Users can never see or access the folder or resource, either directly in the
repository or indirectly when running a report or OLAP view. If one of these
reference a resource that is set to no-access, the user will see an error when trying
to run it.
Execute Only Users can never see the folder or resource in the repository, but they can run
reports or OLAP views that access them. Typically, data sources are execute-only
so that users may run reports but not see database connection details.
Administer Set the permissions (by role and by user) on a folder or resource. This
effectively delegates certain repository administration tasks.
Permissions apply when browsing or searching the repository and when using any dialog that accesses the
repository, like browsing folders to save a report. Note that:
Copying does not preserve the permissions on an object. Users may copy a read-only object, paste it into a
read-write folder, then edit the object. For more details, see 3.3.5, Copying and Moving, on page39.
Copying and cutting (moving) actions can be completed only by a user with Read + Write + Delete access
to the folder in which the object is pasted. For more details, see 3.3.5, Copying and Moving, on page39.
Cutting, deleting, and setting permissions on folders is allowed only if the user has the same permission on
all folder contents.
Cutting and deleting resources in bulk is allowed only if the user has at least Read + Delete permission on
all selected resources.
Deleting a resource is allowed only if no other resources rely on it. For more details, see 3.3.7, Deleting
Folders and Resources, on page41
If you have data or sensitive content in a resource, always set No Access permission for users or roles
that must not be able to access it.
Hiding a resource with execute-only permission does not protect against access, because malicious
users who find the resource ID may be able to create a report, dashboard, or OLAP view that extracts the
sensitive content.
The Permissions dialog opens showing the permissions in effect for the selected object. By default, it first
shows the permissions given to roles. Permissions that are inherited from the object's parent are indicated by
asterisks (*).
In the previous figure, you can see the default role-based permissions on the sample Data Source folder.
Regular users have execute only permission so they do not see this folder, but the reports they run can
access its contents. Administrators are prevented from changing the permission for their administrator role or
user name, to prevent them from removing their ability to set permissions.
4. In the dialog, click User to view the permissions assigned to specific users. Click Role when viewing user
permissions to toggle back.
5. For each user or role, you can select a new permission from the drop-down.
In the next figure, you can see the default user permissions on this folder. In the default installation, all
permissions are defined by role; so, all user permissions are No Access inherited from the root. The figure
shows a read-only permission being granted to the sample end user. This enables joeuser to see but not
modify the Data Sources folder and its contents. For all other end users, the folder is still execute-only due
to the settings in Figure 3-5.
6. Click Apply to apply your changes. If you toggle between user and role permissions, first apply any
changes you made.
7. Click OK to save your changes and close the permissions dialog when you're finished.
You can open several permissions dialogs for different resources or folders at the same time while
navigating the repository. This helps when trying to set permissions uniformly across several folders.
In the case of analysis data, JasperReports Server supports OLAP data sources (such as Mondrian and XML/A
connections). For information about analysis data sources, refer to the Jaspersoft OLAP Ultimate Guide.
You can extend JasperReports Server to support any custom data source. Custom data sources consist of
Java implementation classes, a message catalog, and a Spring bean definition. For more information
about custom data sources, see the JasperReports Server Ultimate Guide.
In the example above, the following data source parameters are specified by attributes:
{attribute('host','User')} - Host will be derived categorically from the logged-in user's attributes,
because the "User" category is specified.
{attribute('port','Server')} - Port will be derived from the server-level attributes.
{attribute('db','Server')} - Database name will be derived from the server-level attributes.
The URL is generated automatically from the host, port, and database fields.
{attribute('userName')} - The user name will be derived hierarchically, because no category is
specified. JasperReports Server will look for a host first in the logged in user's attributes, then in the server-
level attributes.
{attribute('password')} - The password field can also reference an attribute, here a hierarchical
attribute.
For information about attributes on users and the server, see 2.3, Managing Attributes, on page24.
6. Fill in the database user name and password. These are the credentials the server will use to access the
database.
Set the Time Zone field when the date-time values stored in your database do not indicate a time
zone. When date-time values are stored in a format other than local time zone offset relative to
Greenwich Mean time (GMT), you must specify a time zone so that the server can properly convert
date-time values read from the target database. Set the Time Zone field to the correct time zone for
the data in the database. The list of time zones is configurable, as described in B.5.2, Specifying
Additional Time Zones, on page185.
When in doubt, leave the Time Zone field blank.
7. Click Test Connection to validate the data source. If the validation fails, ensure that the values you
entered are correct and that the database is running. To diagnose JDBC connection issues, you can turn on
logging as described in the troubleshooting section A.10.1, Logging JDBC Operations, on page164.
8. When the test is successful, click Save. The Save dialog appears.
9. Enter a name for the data source and an optional description. The Resource ID is generated from the name
you enter. If you haven't already specified a location, expand the folder tree and select the location for your
data source.
10. Click Save in the dialog. The data source appears in the repository.
You need to perform one additional step before installing the Salesforce JDBC driver. For instructions,
see A.10.7, Salesforce JDBC Driver, on page167. This driver is currently not supported on
WebSphere Application Server and WebLogic.
JBoss lacks the flexibility of uploading drivers on the fly. On JBoss, drivers that are not installed don't
appear in the list below, and you must configure and restart JBoss to add a driver. For more information,
see A.10.3, JDBC Drivers on JBoss, on page164.
5. Select the driver that has not been installed, then click Add Driver. The Select Driver dialog appears.
6. If you have not yet obtained the driver, click the link to Jaspersoft's community website for Downloading
and Installing Database Drivers. That page has links to the most commonly used JDBC drivers. After you
download a driver to your file system, you can return to the Select Driver dialog.
7. In the Select Driver dialog, click Browse to locate the appropriate driver JAR file. If your driver has more
than one JAR file, click the Browse button that appears after selecting the first file.
8. Click Upload to install the driver and make it available immediately.
You can replace any driver that you upload with newer versions of the same driver..
3. In the Type field, select JDBC Data Source. The page refreshes to show the fields necessary for a JDBC
data source.
4. The drop-down selector for the JDBC Driver field shows the available JDBC drivers and those that are not
installed.
5. To update a driver that has already been installed, select it from the list, then click Select Driver. The
Select Driver dialog appears and notifies you that selecting a driver will overwrite the existing one.
6. In the Select Driver dialog, click Browse to locate the JAR file for the new driver.
7. Click Upload to replace the existing driver and make it available immediately.
8. You can now use this driver to create a data source.
If the JDBC driver you remove is one that updated a default driver, the default driver will reappear as
an installed driver the next time you use the New Data Source wizard.
Application servers use JDBC connections themselves to expose a database through JNDI. You must
specify the JNDI service name of a JDBC connection. Your application server must also have the
appropriate JDBC drivers and be configured to use them.
For information about setting up a JNDI connection in your application server, see the following sections:
A.10.8, JNDI Services on Apache Tomcat, on page167
A.10.9, JNDI Services on JBoss, on page168
A.10.10, JNDI Services on WebLogic, on page168
Set the Time Zone field when the date-time values stored in the target RDBMS do not indicate a time
zone. When date-time values are stored in a format other than local time zone offset relative to
Greenwich Mean time (GMT), you must specify a time zone so that the server can convert date-time
values read from the target database properly. Set the Time Zone field to the correct time zone for the
data in the data base. The list of available time zones is configurable, as described in B.5.2,
Specifying Additional Time Zones, on page185.
When in doubt, leave the Time Zone field blank.
5. Click Test Connection to validate the data source. If the validation fails, ensure that the values you
entered are correct, that the database is exposed through JNDI, and that the database is running. Also see
the troubleshooting section A.10.8, JNDI Services on Apache Tomcat, on page167.
6. When the test is successful, click Save. The Save dialog appears.
7. Enter a name for the data source and an optional description. The Resource ID is generated from the name
you enter. If you haven't already specified a location, expand the folder tree and select the location for your
data source.
8. Click Save in the dialog. The data source appears in the repository.
4. Under AWS Settings, specify your Amazon credentials in one of the following ways:
If your JasperReports Server is running in Amazon's EC2 service, and it has the proper instance role
assigned, the server will detect this and automatically use your EC2 credentials. Using the EC2
instance credentials requires that the role was properly set up and assigned when the instance was
created. If you're using the EC2 service, we strongly recommend that you use the EC2 credentials.
If your JasperReports Server is not running on Amazon's EC2, enter the AWS credentials associated
with the RDS or Redshift service. If you don't have AWS keys, click Generate credentials, then look
for them on the Outputs tab for your Stack on the Amazon console:
5. Under Select an AWS Data Source, specify the connection details of the AWS data source that you want to
connect to:
a. Select your AWS Region from the drop-down.
b. Click the Find My AWS Data Sources button.
The AWS data source queries your environment and displays your available data sources, as shown in
the figure below.
c. Select your data source.
d. Enter your user name, password, and database name.
The AWS data source queries your environment and adds the appropriate driver and URL.
4. Under Azure Settings, enter your Azure subscription ID, user certificate (.pfx) file, and user certificate
password. Click Browse to select the certificate file from your repository. See Uploading an Azure
Certificate File to the Repository on page59 for instructions on uploading the certificate file.
5. Under Select an Azure Database, specify the connection details of the Azure database that you want to
connect to:
a. Click the Find My Azure Databases button.
JasperReports Server queries Azure and displays your available SQL Server databases.
b. Select your database.
c. Enter your server name, database name, user name, and database name.
The Azure data source queries your environment and adds the appropriate URL.
d. If you have Microsoft's JDBC driver for SQL Server installed on your JasperReports Server instance,
you can choose to use it instead of the existing JDBC driver by checking Use Microsoft Driver.
The current version of Cassandra does not support NULL values in the data. All required fields must have
non-NULL default values. This also means that input controls cannot be null and must be given a value.
The current version of the driver does not support aggregate functions (sum, min, max).
For query parameters, the current version of the driver supports $X(IN...), but no other $X functions.
The Cassandra data source supports queries in the Cassandra Query Language 3 (CQL3). To improve
performance, design your Cassandra data using the following guidelines:
Specify the ALLOW FILTERING suffix to speed up queries.
All fields referenced in WHERE clauses of a query should be indexed.
As with all big data stores, Cassandra data sources have the following limitations and usage guidelines within
JasperReports Server:
Cassandra data sources are not supported for OLAP connections.
You must configure your JVM memory to handle the expected amount of data (see the JasperReports
Server Community Project Installation Guide).
4.7.1 Creating a Cassandra Data Source with the Native Cassandra Driver
1. Log on as an administrator.
2. Click View > Repository, expand the folder tree, and right-click a folder to select Add Resource > Data
Source from the context menu. If you installed the sample data, the suggested folder is DataSources. The
New Data Source page appears.
3. In the Type field, select Cassandra Data Source. The information on the page changes to reflect what's
needed to define a Cassandra data source.
You have the option to use attributes in the values of data source parameters. See 4.1, Attributes in Data
Source Definitions, on page48.
4. Fill in the required fields, along with any optional information you choose.
Use port 9042 with the Cassandra data source. Cassandra's default port of 9160 is for the Thrift client that is
commonly used with Cassandra. To use the Cassandra Query Language (CQL) with our Cassandra data
source, you may need to configure your Cassandra instance as follows:
start_native_transport: true
native_transport_port: 9042
5. If you have configured your Cassandra source to be password protected, specify a valid username and
password. Due to compatibility issues, Cassandra authentication is supported only when you use Cassandra
1.12.18 and above.
6. Click Test Connection to check the values you entered. Make sure that the port is set to 9042, because
the connection test will also work with the wrong port (9160).
7. When done, click Save. The Save dialog appears.
8. Enter a name for the data source and an optional description. The Resource ID is generated from the name
you enter. If you haven't already specified a location, expand the folder tree and select the location for your
data source.
9. Click Save in the dialog. The data source appears in the repository.
To test this configuration, you can increase the limits for the current session with the following Linux
commands:
sudo ulimit -Hn 32768
or
sudo ulimit -Sn 32768
The effects of the commands above will be reset when the computer restarts. To make the changes permanent,
edit the file /etc/security/limits.conf to add the following settings:
4.8.1 Creating a MongoDB Data Source with the Native MongoDB Driver
To create a MongoDB data source with the native driver:
Follow these steps to create a MongoDB data source with the native MongoDB driver.
1. Log on as an administrator.
2. Click View > Repository, expand the folder tree, and right-click a folder to select Add Resource > Data
Source from the context menu. If you have installed the sample data, the suggested folder is DataSources.
The New Data Source page appears.
3. In the Type field, select MongoDB Data Source. The information on the page changes to reflect what's
needed to define a MongoDB data source.
You have the option to use attributes in the values of data source parameters. See 4.1, Attributes in Data
Source Definitions, on page48.
Before you can enable x509 authentication you need to set up the Java Secure Socket Extension (JSSE)
in your application server. Before you can enable Kerberos authentication you need to perform the steps
in 4.8.3, Using Kerberos Authentication with MongoDB Data Sources, on page68.
the JavaScript Object Notation, a textual representation of data structures that is both human- and machine-
readable.
The Jaspersoft MongoDB Query Language is a declarative language for specifying what data to retrieve from
MongoDB. The connector converts this query into the appropriate API calls and uses the MongoDB Java
connector to query the MongoDB instance. The following examples give an overview of the Jaspersoft
MongoDB Query Language, with the equivalent SQL terms in parentheses:
Retrieve all documents (rows) in the given collection (table):
{ 'collectionName' : 'accounts' }
From all documents in the given collection, select the named fields (columns) and sort the results:
{
'collectionName' : 'accounts',
'findFields' : {'name':1,'phone_office':1,'billing_address_city':1,
'billing_address_street':1,'billing_address_country':1},
'sort' : {'billing_address_country':-1,'billing_address_city':1}
}
Retrieve only the documents (rows) in the given collection (table) that match the query (where clause). In
this case, the date is greater-than-or-equal to the input parameter, and the name matches a string (starts with
N):
{
'collectionName' : 'accounts',
'findQuery' : {
'status_date' : { '$gte' : $P{StartDate} },
'name' : { '$regex' : '^N', '$options' : '' }
}
}
The Jaspersoft MongoDB Query Language also supports advanced features of MongoDB such as map-reduce
functions and aggregation that are beyond the scope of this document. For more information, see the language
reference on the Community website.
a. Use the File Source drop down to select your schema file location: Repository or Server File System.
To create a schema using the schema tool, see Creating a Schema with the Schema Tool on
page69
b. If your file is in the repository, click the Browse button and locate it in the repository. If your file is in
your server file system, enter the path in the Server File Location text box. To upload a schema to the
repository, see Uploading a Schema to the Repository on page69
7. Click Test Connection to validate the data source.
8. When the test is successful, click Save. The Save dialog appears.
9. Enter a name for the data source and an optional description. The Resource ID is generated from the name
you enter. If you haven't already specified a location, expand the folder tree and select the location for your
data source.
10. Click Save in the dialog. The data source appears in the repository.
java.security.krb5.realm=<Kerberos_realm>
java.security.krb5.kdc=<KDC_server_hostname>
javax.security.auth.useSubjectCredsOnly=false
java.security.auth.login.config=<path>/jaas.conf
com.sun.security.jgss.krb5.initiate {
com.sun.security.auth.module.Krb5LoginModule
required
useTicketCache=true
doNotPrompt=true;
};
<util:set id="customDataSourcesToHide">
<value>xmlaQueryDataSource</value>
<value>sparkQueryDataSource</value>
<!-- value>remoteXmlDataSource</value -->
<value>mongoDBQueryDataSource</value>
<!-- value>jsonDataSource</value -->
<value>jdbcQueryDataSource</value>
<value>cassandraQueryDataSource</value>
</util:set>
After file data sources are enabled, you can create a file data source.
The headers in data source text files must not be blank and cannot contain spaces or special characters
other than underscores.
In order to upload a JSON file to the JasperReports Server repository, you must save it with the .xml
extension on your computer. Then create an XML file resource and select your JSON.xml file. Give your
resource a name such as MyDataFile_JSON so you can find it. The repository calls it an XML file, but the
data source can interpret the JSON contents.
4. Enter the URIof the JSON file. You can specify a file in the repository with the repo: syntax, followed by
the repository path of the file. Specify ftp:, http: or https: to use those Internet protocols. To specify a
file on your server's file system, specify its path directly, starting from the root, for example
/tmp/MyDataFile.json. The user running the server process must have permission to access the file.
5. You can specify a optional query to limit or select the data accessible through the data source. The query
has the following syntax:
<tableName> or <tableName>/<fieldName>
where:
<tableName> corresponds to an XML element or JSON structure name
<fieldName> corresponds to an XML sub-element or JSON field name
As of JasperReports Server 6.0, there have been some changes to bean data sources that might affect your
custom code. If your custom data sources generate errors after upgrading, see the troubleshooting section
A.10.12, Upgrading Bean Data Sources, on page169.
Once the data source service bean is available through Spring, you can add the bean data source to the
repository.
5. Click Test Connection to validate the data source. If the validation fails, ensure that the values you
entered are correct and that the bean is in the classpath.
6. When the test is successful, click Save. The Save dialog appears.
7. Enter a name for the data source and an optional description. The Resource ID is generated from the name
you enter. If you haven't already specified a location, expand the folder tree and select the location for your
data source.
8. Click Save in the dialog. The data source appears in the repository.
5.1 Queries
A JasperReport uses a query to select the data to be returned from the data source. You can define the query in
the JRXML itself, but you can also create and save queries in the repository. A query saved in the repository
can be re-used by multiple JasperReports.
Reusing a query enables you to adapt reports to different audiences. The query returns the same data from the
same data source every time, but each report presents the data in a different way. Also, separating the query from
the JRXML makes it easier to maintain large numbers of reports when the data source changes and the query
needs to be updated.
You can also use queries to populate list input controls, as described in 5.5, Query-based Input Controls, on
page80 and 5.6, Cascading Input Controls, on page85.
3. Right click the folder's name and select Add Resource > Query from the context menu. The Add Query
page appears.
4. Enter a name for the query. Resource ID is filled in automatically, and the description is optional. Click
Next. The Link a Data Source page appears.
5. Select the data source and click Next. Your options are:
Do not link a data source. If no data source is associated with the query, the server uses the data
source associated with the report that references the query.
Create a new data source. You can define a local data source within this query resource that's not
accessible to any other resource. Click the link to create any data source as described in Chapter 4,
Data Sources, on page47. This new data source overrides any data source specified in reports that
use the query.
Select data source from repository. This creates a reference to a data source in the repository. Click
Browse to select an existing data source. The data source you select overrides any data source
specified in reports that use the query.
8. Click Save.
By default, JasperReports Server supports SQL, CQL (Cassandra), and MongoDB, while JasperReports Library
supports several more (such as EJBQL, xPath and MDX). However, JasperReports Server can support additional
query languages if a query executor implementation is properly configured for each additional language when
the server is deployed.
You can use a specialized bean data source to support multiple query languages. For information about bean
data sources, refer to 4.10, Bean Data Sources, on page71. Another option to add new types of data sources
to the server to extend the reach of the JasperReports Server platform. Custom data sources are described in the
JasperReports Server Ultimate Guide.
5.2 Datatypes
A datatype defines the format of a single-value input control, for example text or numerical. Datatypes
determine what users can enter in the input fields that correspond to parameters in a report:
Text
Number
Date
Date/time
To create a datatype:
1. Log on as an administrator.
2. Click View > Repositoryand locate the folder for the datatype.
3. Right click the folder's name's name and select Add Resource > Datatype from the context menu. The
Add Datatype page appears.
4. Enter a name and optional description for the datatype. The resource ID is filled in automatically.
5. Select the datatype and provide related information. Your options are:
Text You can specify a regular expression in the Pattern field. The expression is used to validate the
text the user submits. For instance, you could enter an expression that tests for email addresses.
Number With numerical datatypes, you can control the range of acceptable values by specifying
minimum and maximum values and whether the specified values are themselves acceptable (Minimum
is Strict and Maximum is Strict check boxes). If you select a Strict check box, the specified value is
not acceptable.
For instance, for a percent field, you might specify a minimum of 0 and a maximum of 100. If you do
not want to accept 0 percent, you would check Minimum is Strict. If you want to accept 100 percent,
you would clear Maximum is Strict.
Date and DateTime Click the calendar icon to the right of the Minimum and Maximum date or date
time fields to choose their values.
6. Click Save. The datatype resource appears in the repository.
4. Enter a name for the list of values. Resource ID is filled in automatically, and the description is optional
5. Enter the name and value for each item in the list and click Add.
The name and value are both treated as strings. Users see the label only in an input control that uses the
list, and the report receives only the value. To remove an item, click Remove beside the value.
6. Click Submit. The list of values resource appears in the repository.
JasperReports Server supports several types of input controls, each of which can map to certain types of
parameters in the report's JRXML. The input control also determines the kind of widget the user interacts with:
Boolean Presented as a check box. These input controls return a java.lang.Boolean object to the report
engine in response to the user's selection. Boolean input controls return .TRUE or FALSE as values,
depending on whether the box is checked.
Single value Presented as a free-form text box. You must specify a datatype, for example text or numerical
value, and the user's entry is validated against this datatype.
Single-select Presented either as a drop-down list or a set of radio buttons. A single-select input control
returns a single value.
Multi-select Presented as a scrollable list of values or a set of check boxes. A multi-select input control
returns a collection of values.
One advanced feature of single-select or multi-select input controls is that the values they present can be the
result of a dynamic query. The query retrieves actual values from the data source before presenting them as
choices to the user. These queries can contain parameters themselves, for example based on the logged-in user or
the selection of a previous input control. Query parameters are described in 5.5, Query-based Input Controls,
on page80 and 5.6, Cascading Input Controls, on page85.
Input controls rely on other resources in the repository, such as datatypes, static lists of values, or queries. You
can manage these resources the same way you manage other resources. You can define them locally (available
only to the input control) or reference them externally (reusing a resource in the repository). For more
information, see 3.2.3, Local Resources and External References, on page34.
As with other resources, input controls can be created locally as part of a JasperReport, in which case they
cannot be seen outside that JasperReport, or they can be created separately in the repository and referenced in
multiple reports.
To use an input control in a report, the control must meet two conditions:
The parameter name in the input control must correspond to the name of the parameter in the report. No
error occurs for a mismatch, but at run time NULL is passed instead of actual value of the parameter.
The input control and its corresponding parameter must be of compatible datatypes (for example, both must
be text types or date types). If there is a mismatch, the report fails and an exception is returned.
This section explains how to create an input control in the repository. To reference input controls in a
JasperReport, see the JasperReports Server User Guide.
4. Select the type of input control from the Type list. In this example, Single Value is selected.
5. Enter the prompt to tell users how to use the control. This example, uses the prompt Select the text
for the report title.
6. In practice, the prompt text is often the same as the parameter, so the parameter name is automatically filled
in. If you have used a different prompt, edit the Parameter Name field and enter the exact name of the
parameter for your control. Remember, the parameter name must be the same here as in the reports that use
this input control.
For this example, the parameter name is title. Description is optional.
7. Select options for the control. Your options are:
Mandatory Forces the end user to supply a value.
Read-only Displays the value of the parameter without allowing the end user to modify it.
Visible Makes the input control visible in the report options dialog.
8. Click Next.
Subsequent pages depend on what type of input control you chose:
Boolean types do not require any further information.
Single-value types require a datatype the user can enter.
Single-select and multi-select types based on static lists require a list of values.
Single-select and multi-select types based on queries require a query.
9. In this single-value example, the Locate Datatype page appears. Choose the option to select a datatype from
the repository and click Browse. In the repository dialog, select /datatypes/TextGeneralDatatype,
which is similar to the datatype we created in 5.2, Datatypes, on page75.
If you choose to define a datatype, the wizard takes you through the same procedure as in
section5.2, Datatypes, on page75. You can then define any datatype you need, but it's local to
the input control and not reusable in other input controls.
10. Click Next. The input control resource is created in the repository.
11. Locate the input control in the repository manager. Notice that the text of the prompt that you entered in
step5 is also used as the name for the resource.
4. Select the type of query-based input control from the type drop-down list. This determines how the input
control appears to users, either as a drop-down list, a set of radio buttons, a multi-select list, or a set of
check boxes. In this example, we choose a single-select query-based input control type.
5. Specify the prompt text, parameter name, optional description, and appearance options in the same manner
as when defining a regular input control.
6. Click Next. Because we selected one of the query-based types, the Locate Query page appears:
If you have a suitable query defined in the repository, you can select it here as an external reference. In this
example, we'll define a query locally inside the input control.
7. Click Next to define the local query resource. The query naming dialog appears:
Although the query resource is not visible in the repository, it may still have a name, ID and optional
description within the query resource. However, the values for these fields are not important.
8. Enter any name, and the ID is filled in automatically. Then click Next. The link data source page appears:
Like all queries, the query inside the input control may optionally link to a data source, either in the
repository or its own internally defined one. If no data source is linked, the query in the input control uses
the same data source as the report. In this example, we use the default of not linking to a data source.
10. Select the query language, in this example SQL, and enter a query string. The SELECT statement should
contain the names of all fields used in the display, value, or filter for the input control. In this example, the
query returns three fields, country, state, and city. Country limits the values to a single country. The
ORDER BY clause ensures that the values from the query are sorted alphabetically when they appear in the
input control.
11. Click Save to complete the query definition. The parameter values page appears:
On the parameter values page, you specify which fields in the query result are displayed, and which field
contains values that become the parameter value. when chosen.
a. First, specify the value column. This is the field whose value is passed to the report. The datatype of
the field must match the type of the corresponding parameter in the report.
b. Next, specify the visible columns. These are the fields whose values appear in the input control the user
chooses from. In the simplest case, enter the same field as the value column. If you add multiple fields
to the visible columns, the input control displays the fields together, in the order listed, separated by a
vertical bar (|). In this example, the user can see and choose from:
Los Angeles | CA
San Francisco | CA
Denver | CO
Only the city value (without the state) is passed to the report. Showing additional fields in this way
can help users find the value they want in long lists of results.
The value and display columns may also be entirely different, for example, displaying the full name of
a sales representative, but using the employee ID as the value returned by the input control. The only
restriction is that all fields used in the value or display list must be selected by the query.
LoggedInUserRoles Collection The roles assigned to the current user. This is helpful for
<String> parameters that use $X.
Attributes defined on users or at the server-level can also be used in reports and query-based input controls. For
more information, see 2.3, Managing Attributes, on page24.
LoggedInUserAttributes Map<String, The attributes of the logged-in user. This parameter isn't
String> usable in query input controls, but it is used as a
parameter to the report. If the user has no attributes, the
parameter is an empty map.
LoggedInUserAttribute Collection The names of the attributes of the logged-in user. This is
Names <String> helpful for parameters that use $X. If the user has no
attributes, the parameter is an empty map.
LoggedInUserAttribute Collection The values of the attributes of the logged-in user. This is
Values <String> helpful for parameters that use $X. If the user has no
attributes, the parameter is an empty map.
LoggedInUserAttribute_ String For the logged-in user, the value of the attribute matching
<attribute-name> the name passed as <attribute-name> (such as
att1). If there's no attribute with this name for this user,
the parameter is empty.
This parameter is available only if it's defined in a query
or as a report parameter.
ServerAttribute_ String The value of the named attribute defined at the server
<attribute-name> level. If there's no attribute with this name at the server-
level, the parameter is empty.
This parameter is available only if it's defined in a query
or as a report parameter.
Los Angeles | CA
San Francisco | CA
Denver | CO
the query may still generate a list of hundreds of cities to scroll through. Even though each city is easy to
identify with the state, scrolling through a long list is time consuming. With cascading input controls, this
example can have two input controls, one for the state and one for the city: The city input control is empty
until the user selects a state.
When input controls are displayed, the query for the state input control returns an alphabetical list of
unique state names.
When the user selects a state, the query for the city input control is triggered and returns the list of cities in
that state. When the user selects one and submits it, the city name is passed as a parameter to the report.
For an especially large number of cities, you can use more cascading input controls, such as region of state, to
reduce the list.
The parameter values determined by each cascading input control may or may not be used in the report. For
example, if the report only shows data about a city, the country input control exists only to speed up the choice
of city. However, if the report also shows information such as city average compared to country average for a
given measure, the country parameter is also used in the report.
If the user selects the values Canada, Mexico, and USA in the COUNTRIES multi-select input control, the
$X{} syntax translates into the following query for the CITIES input control:
select city from ACCOUNTS where country IN ('USA','Canada','Mexico')
When defining these parameters in a report, don't use a defaultValueExpression element. Due to a
limitation in JasperReports Server, these parameters are null when a defaultValueExpression is
provided.
The $X syntax also supports the following operators. They are all designed to handle null input by generating 0
= 0 when the parameter value is null:
For more information on using $P, $P! and $X to build dynamic queries, see the JasperReports Library Ultimate
Guide and the Jaspersoft Studio User Guide.
Any number of parameters can be used in a query, just as any number of input controls can be defined in a
JasperReport. In addition to the standard input control parameters, a cascading input control query can use the
built-in parameters described in Table 5-1, Built-in Parameters for Query-based Input Controls, on
page84.
You can connect Jaspersoft Studio to JasperReports Server. Once connected, the reports on the server
will appear in the repository tree in Jaspersoft Studio. For more information see the Jaspersoft Studio
User Guide.
We'll start with a report containing the following dataset fields: ORDERED, CUSTOMERID, EMPLOYEEID,
SHIPCITY, and SHIPCOUNTRY.
Our sample report is based on the following query that requires the user to enter a city:
select * from orders where SHIPCITY=$P{City}
2. Define an SQL query that uses the value of Country to derive valid values for City.
Select distinct SHIPCITY from orders where SHIPCOUNTRY = $P{Country} order by SHIPCITY
CSS Cascading Style Sheet file that helps define the user interface as part of a theme.
Font True Type font (.ttf) file to extend the set of fonts available in a report and allow
embedding of fonts in the PDF output, if needed (see 5.7.1, Fonts, on page92).
Image Any image format supported by the JVM (Java Virtual Machine), such as JPEG,
GIF, and PNG. Image files can be referenced in JasperReports, and also in CSS
files.
JAR Libraries that provide functionality for your reports (see 5.7.2, JAR Files, on
page93).
OLAP Schema Defines the data in an OLAP cube, including how to aggregate the dimensions.
Resource Bundle A Java .properties file containing key-value pairs for localization of reports (see
5.7.3, Resource Bundles, on page93).
Style Template A JRTX file containing a style template that can be shared among JasperReports.
XML XML file used in Domains and analysis to define data-level security. Can also be
used for XML and JSONdata files (see 4.9, File Data Sources, on page69).
Azure Certificate A x.509 server certificate (.cer) or key exchange (.pfx) file used to authenticate
JasperReports Server with Microsoft Azure (see Uploading an Azure Certificate
File to the Repository on page59).
Secure File A SSH private key file for SFTP file transfers that require a SSH key (see Upload-
ing an SSH Private Key File to the Repository on page95).
The way in which fonts, JAR files and resource bundles are associated with reports is further explained in the
following sections.
5.7.1 Fonts
The server relies on the JasperReports Library as its content rendering engine, which enables it to produce high-
quality, pixel-perfect documents. The server can use any of the fonts available to its JVM as logical or physical
fonts. This solution is perfect for HTML reports that are stored in the server.
However, when exporting the report to PDF, you may need to take additional steps if the report includes fonts
that the PDF viewer doesn't recognize, or if the report requires fonts that your users do not have on their
computers. In this case, you must embed the font in the PDF file itself. To embed a font, you must edit the
report's main JRXML file; the TTF (True Type Font) file that the report references must be available to the
server at run time. One way to ensure that the server has the correct font is to upload it to the repository by
creating a file resource. Then, the report can refer to the font's URI in the repository.
For details about working with fonts and PDF export, refer to the JasperReports documentation.
4. When done, click Submit. The new file resource appears in the selected folder in the Repository panel.
4. Use the Edit dialog to view or modify the resource definition and its values. In the figure above, you can
see how the Description field was changed. You can also change the contents of the file resource by
specifying another file to upload. The Path to File field is not required unless you want to reload the file
from disk.
5. Click Submit to save any changes.
The set of files in the default theme was updated in 6.1. Custom themes developed before 6.1 may
require upgrading to work with the new set of files. For more information see the upgrade procedures in
the JasperReports Server Community Project Upgrade Guide.
Scenario Description
Use the default theme If the default theme suits your needs, there's no need to customize it or
unchanged. develop new themes.
Quickly modify the default theme. You can specify overrides of individual CSS rules or replace images in the
default theme. After creating and uploading the new files, your theme is
active immediately.
Create an entirely new theme. With CSS experience or Jaspersoft Professional Services, you can change
the entire look and feel of the server. You can create a custom theme to
match or blend with nearly any other web design.
You cannot modify the files of the default theme through the repository. If you try to do so by
circumventing the repository, you could inadvertently change rules and make the UI unusable. If this
happens, you'll need to re-install JasperReports Server to recover.
Default theme root > Themes > The unmodified UI as it appears at installation. The default theme is
default defined in the default folder in the Themes folder at the root of the
repository.
Active theme root > Themes > The active theme set at the root level. Users see a combination of the
active-theme active theme and the default theme, depending on the files in the act-
ive theme and the inheritance rules.
If no custom theme is made active, the default theme is the active theme.
The following figure shows the files of the default theme in the Themes folder at the root of the repository. The
name of the folder and its subfolders are bold indicating that it's the active theme.
The set of files in the default theme was updated in release 6.1. Custom themes developed before 6.1
may require upgrading in order to work with the new set of files. For more information see the upgrade
procedures in the JasperReports Server Community Project Upgrade Guide.
The images associated with a theme include all the icons in the user interface and backgrounds for buttons and
borders. Several icons and backgrounds can be stored in the same file called a sprite. The theme also includes
the favicon.ico file that appears on browser tabs. There are over 70 image files in the default theme.
The image files for the default theme are stored in a folder named images. In a custom theme, there are two ways
to change an image of the default theme:
Create a folder named images and an image file with the same name as the one you want to replace.
Modify the corresponding CSS rules to specify the name and location of a different image.
When you modify the CSS rules, you can use any of the following ways to reference image files or any other
helper file:
Directly in the theme folder. In this case the file is referenced without a path, for example "myfile.png" in
CSS.
In any folder path located in the theme folder. For example, your custom CSS file could refer to
"MyImages/myfile.png" if you create a folder named MyImages in the theme folder and upload your
images there.
Anywhere on the Internet. Following the CSS standard, your custom CSS can refer to images or any helper
file with a regular URL.
6.2.2 Inheritance
In order to render the user interface, JasperReports Server must load each of the CSS files listed in Figure 6-1.
Because each file can be stored in multiple themes, inheritance determines which file to load. To locate the file,
the server looks in the following locations, in the order listed below.
1. The active theme folder: /Themes/<active-theme>
2. The default theme stored in /Themes/default.
When one of the CSS files references an image file or a helper file, including any path to that file, the server
looks for that path and filename in the same two locations, in the same order. In this way, each file and image is
resolved first in the active theme, and if not found, then in the default theme.
The active theme does not need to contain all the files because the default theme is guaranteed to contain all
the files.
An example of these extensive changes would be if you want to increase the size of the buttons themselves
in the default theme. You would need to rewrite the majority of the rules in the buttons.css file and create
images for the new buttons. In this case, it is much easier to copy the buttons.css file than to copy dozens of
rules into the overrides_custom.css file. You could still use the overrides_custom.css file to adjust the
spacing of elements around the buttons, because there would be fewer of those rules to modify.
We recommend using the custom overrides method for most custom themes. A custom theme that changes
simple appearances such as colors, fonts, and spacing has relatively few rules and is easily manageable in a
single file. And many changes can be made by copying and modifying image files in the custom theme, without
writing any CSS rules. Only if you change the fundamental layout or appearance of the user interface, should
you consider copying and modifying the other CSS file.
Copying and modifying CSS files is more prone to error, and is slightly less flexible due to file-based
inheritance. Your copy of the file must contain all of the CSS rules as the original. If any rules are accidentally
deleted or modified, even by a single character, the theme may not work properly.
The Easy Access theme is specifically intended to improve the web UI's accessibility. It increases color
contrast and highlighting in the web UI. It can improve the user experience of those with visual
impairment.
This procedure assumes you have already created and uploaded your theme:
1. Log into JasperReports Server as administrator (jasperadmin).
2. Click View > Repository and expand the root/Themes folder if necessary.
3. Right-click the chosen theme folder and select Set as Active Theme.
For example, the sample data includes a theme called jasper_dark that you can set as active.
As soon as the screen is refreshed, you see the effect of the new theme. Notice how the jasper_dark theme
changes the colors in the user interface with just the overrides_custom.css file and some image files.
When you change the theme, it applies immediately to all users on the server. Also, the new theme applies to
the login page, as shown in the following figure.
Theme folders and files can be created, copied or moved anywhere in the repository, but they can only
be made active, uploaded, or downloaded when properly placed in the Themes folder.
4. Right-click your new folder and select Add Resource > File > CSS, and use the dialog to upload an
individual CSS file. In order to be used as part of a theme, it must be one of the file names shown in Figure
6-1.
5. To add images to your theme, create any image folders and upload image files with Add Resource > File
> Image.
6. Repeat step4 and step5 to create all the files and images you need. If several themes use the same files or
images, you can copy-paste the file resources or entire image folders from one theme to another.
7. If you need to change the contents of a CSS or image file, you can right-click it and select Edit to specify
another file to upload and replace the current file.
If you upload CSS and image files into the active theme, the changes are visible after reloading the page
in your browser.
Interacting with theme folders and files through the repository is a convenient and flexible way to create a
theme. However, this method suffers from the limitation that, like other repository resources, you cannot
download the files or images to edit them. For this purpose, the repository provides special download and
upload actions on theme folders.
The ZIP file should include only the contents of your theme, not the theme folder itself.
3. Log in as an administrator.
4. Click View > Repository and expand the Themes folder if necessary.
5. Right-click the Themes folder and select Upload a Theme.
6. In the dialog that appears, enter a name for your theme, and browse to find the ZIP file on your computer.
Click Upload. The theme name becomes the name of the theme folder.
You cannot use the ZIP upload dialog to overwrite an existing theme. You must specify a theme name
that doesn't already exist in the Themes folder.
The server uploads your ZIP file and extracts it contents. Then it creates a folder for the new theme and
creates file resources in the folder for each of the CSS and images in your ZIP file. If you had sub-folders in
your theme, they are created as well. After uploading your theme ZIP file, you can make it active to see
effect of your theme on the user interface.
Creating a theme is an interactive process where you often need to make changes until you have the look and
feel you want. To support this process, uploading ZIP files can be combined with the uploading of individual
file resources that is described in 6.4.1, Creating Theme Folders and File Resources, on page103. In fact,
after an initial upload, it is much easier to update individual files in this way than to create the ZIP file and
upload it again.
Step Reference
1. Download the default theme so you have a copy of the 6.4.2, Downloading and Uploading Theme ZIP
files and CSS rules that you want to modify. Files, on page104
2. Create your new CSS rules, CSS files, and image files. 6.5.2, Firefox Web Developer Tools, on
page106
3. Upload your new files to a test platform, and activate 6.4.1, Creating Theme Folders and File
the theme or place them in an active theme. Resources, on page103
4. Verify your changes wherever they occur in the UI. 6.5.3, Test Platform, on page107 and 6.5.5,
User Interface Samples, on page107
This activates your theme for the test user on all pages that you access until the user session times out. This
allows you to navigate the entire application and see the effect of your theme in the production environment,
without affecting other users.
To set the theme back to the default append the &theme parameter to the URL with the string default
(&theme=default). This is especially useful if a problem with the current theme has inadvertently
disabled any functionality.
On all of these test platforms, you should look at the user interface generated by your theme with the same
browsers and browser versions that your users have. If you see errors, you can still use the Firefox web
developer tools to look at the CSS rules that are involved, even if the errors do not show up in Firefox.
4. Look at all the sample components in each of the sample galleries. For example, the buttons gallery shows
all the different types of buttons in every possible action state.
5. When you click on the standard layouts, the sample replaces the samples page. Select View > UI Samples
from the main menu again to return to the galleries.
The samples page relies on an extra CSS file that is not required in a theme, but that can be included.
The file samples.css is located in the default theme in the system-level Themes folder. If the sample
elements do not appear as you expect, add this file to your theme and customize its rules as necessary.
The rules in this file are not used anywhere else in the user interface, so it should not be included in your
final theme.
Viewing the sample galleries can help you quickly find errors in your theme, especially if you are changing
many rules and replacing entire files in your theme. Using these samples along with the testing procedures and
tools described previously, you can verify that your theme properly implements the custom user interface that
you intend. Having a well-tested theme minimizes the chances of errors when you activate the theme in your
production server.
As of JasperReports Server 5.5, user passwords and data source passwords are encrypted in exported
catalogs as well as in the server's internal database. You should still take appropriate measures to secure
the catalog file from unauthorized access. Catalog files may contain sensitive metadata such as user
names, database URLs, and customer information. Catalog files may also contain data in the form of
report output such as the PDF of an executive report.
Configuration File
.../WEB-INF/applicationContext-security.xml
<property name="keyBytes"> importExport Set the value of the keyBytes property to the
<value>0x2b 0x6c 0x34 0x22 Cipher same hexadecimal value (16 bytes = 128 bits)
0x44 0x42 0x6f 0xb5 0x7f on all servers that will exchange export
0x34 0xd3 0x5a 0x1f 0x92 catalogs.
0xcd 0xdc</value>
</property>
When you change a private key on a server, all previous exports become unusable. Therefore, you must
configure your new server soon after installing it, and you should configure it with the key from an existing
server, if you have one. This way all your servers and all your export catalogs will use the same key and
be mutually compatible.
Section Actions
Importing From the Settings Import any catalog into the server
If you're exporting to a different server, you must configure an encryption key on both servers, as
described in 7.1.2, Setting the Import-Export Encryption Key, on page110.
5. If desired, change the default name of the zip file for the exported catalog. This dialog allows only the zip
archive format.
6. Choose one or both of the export options:
Include report jobs When checked, the export includes scheduled report jobs with any reports in
your repository selection.
Include repository permissions When checked, the export includes any explicit permissions on
all items in your repository selection. Clear this check box if you want the exported items to inherit the
permissions of the destination repository.
7. Click Export. The server generates the catalog zip file and your browser prompts you to save the file.
Depending on the size of your repository and the options you've selected, it may take several minutes to
generate the catalog file.
Resources are exported along with any dependencies, even if they're not included in your repository
selection. For more information, see 7.1.1, Dependencies During Import and Export, on
page110.
Catalogs may be very large and take a long time to generate and then download. During this time,
the export operation may affect server performance.
If you're exporting to a different server, you must configure an encryption key on both servers, as
described in 7.1.2, Setting the Import-Export Encryption Key, on page110.
3. If desired, change the default name of the zip file for the exported catalog. This dialog allows only the zip
archive format.
4. Use the check boxes and radio buttons to choose the contents of your exported catalog file.
Select Export Everything (default) to export the entire repository, including all users and roles, and all
types of assets. Select the check boxes under Events to Export to include the different types of events in
your export catalog.
5. Clear Export Everything to select users and roles or resource types to export.
a. To export users and roles, choose one of the radio buttons, then select individual users and roles from
the lists.
Selected roles and users Only the roles and users you select explicitly are exported.
Users with selected roles Select one or more roles, and all users with those roles are exported,
along with the selected roles.
Roles with selected users Select one or more users, and all roles assigned to those users are
exported, along with the selected users.
b. If you only want users and roles, clear all check boxes under Resources to Export.
c. Or if you only want resources, do not select any users and roles, then select the resource types you
want to export.
d. Select the check boxes under Assets to Export to include these various assets in your export catalog.
e. Select the check boxes under Events to Export to include the different types of events in your export
catalog.
6. Click Export. The server generates the catalog zip file and your browser prompts you to save the file.
Depending on the size of your repository and the options you've selected, it may take several minutes to
generate the catalog file.
Resources are exported along with any dependencies, even if they're not included in your repository
selection. For more information, see 7.1.1, Dependencies During Import and Export, on
page110.
Catalogs may be very large and take a long time to generate and then download. During this time,
the export operation may affect server performance.
If you're importing from a different server, you must configure an encryption key on both servers, as
described in 7.1.2, Setting the Import-Export Encryption Key, on page110. . You'll need to enter the
keystore password when prompted by the import operation.
3. Click Browse to choose the catalog zip file to import. The dialog allows only the zip archive format.
4. Use the check boxes to change the behavior of the import operation:
When checked, the Update option will import only resources that are newer than ones with the same
URI in the current repository. The Skip user updates option allows you to keep the current definition
of any users that also exist in the imported catalog.
When checked, the Include access events option imports the modification times of resources from
the catalog. When cleared, resources keep their existing access times if they already exist.
The Include server settings option determines whether the system configuration is updated from the
catalog. There are two prerequisites in order for the catalog to contain configuration settings:
The originating server settings must be modified through the UI. Thus, only Log Settings, OLAP
Settings, and Cloud Settings are affected. For more information, see 8.1, Configuration Settings in
the User Interface, on page124
The catalog must be exported with the everything option or the specific Server Settings
option.
When server settings are imported, they take effect immediately and appear in the Settings UI.
5. Click Import.
The server uploads the catalog zip file and imports its contents into the repository. Depending on the size
of the catalog and the options you've selected, it may take several minutes to perform the import.
Resources are imported along with any dependencies, unless you do not have permission to write at
the dependency's location. Broken dependencies may block the import operation. For more
information, see 7.1.1, Dependencies During Import and Export, on page110.
Catalogs may be very large and take a long time to upload and then process. During this time, the
import operation may affect server performance.
If you installed JasperReports Server from the binary installer, the command-line utilities were configured
by the installer. If you installed the WAR file distribution, you must follow the instructions in 7.3.3,
Configuring Import-Export Utilities, on page120 before you can run the utilities.
The import and export utilities are shell scripts located in the <js-install>/buildomatic folder:
Windows: <js-install>/buildomatic/js-import.bat
<js-install>/buildomatic/js-export.bat
Linux: <js-install>/buildomatic/js-import.sh
<js-install>/buildomatic/js-export.sh
The examples in this chapter use the shortened Windows commands without the optional .bat extension on the
command line. If you're running JasperReports Server on Linux, be sure to add the .sh file extension.
When using the import and export utilities, keep the following in mind:
JasperReports Server should be stopped when using the import and export utilities. This is very important
for the import utility to avoid issues with caches, configuration, and security.
All command line options start with two dashes (--).
You must specify either a directory or a zip file to export to or import from.
If you're importing to a different server, configure an encryption key on both servers, as described in 7.1.2,
Setting the Import-Export Encryption Key, on page110. Then enter the keystore password when
prompted by the import command.
Make sure the output location specified for an export is writable to the user running the command.
All URIs are repository paths originating at the root (/).
The import and export scripts provide access to the repository and internal database of the server. Even
though all passwords are encrypted during export, a catalog may still contain sensitive URLs and data.
You should set permissions on the host file system and operating system to secure the scripts and any
catalogs you export.
We recommend you stop your server instance before running the export utility. For instructions see the
JasperReports Server Community Project Installation Guide.
Specifies repository resources such as reports, images, folders, and scheduled jobs to export. You can also export
the internal definitions for scheduled jobs, users, roles, and audit data. The export output is known as a
repository catalog. It's either a zip archive file or a set of files in a folder structure.
Option Explanation
--include-access-events Exports repository events (date, time, and user name of last
modification).
--report-jobs Comma separated list of repository report unit and folder URIs for which
report unit jobs should be exported. For a folder URI, this option exports
the scheduled jobs of all reports in the folder and all subfolders.
--calendars When specified, the export includes any and all calendars of all types
(holiday, recurring, ...) defined in the scheduler. When calendars are
present in an export catalog, they're always processed and added upon
import.
--uris Comma separated list of folder or resource URIs to export from the
repository. If the URI specifies a folder, the export operation exports all
resources and folders contained in the folder. In addition, it recurses
through all its subfolders.
--repository-permissions This option exports repository permissions with each exported resource
or folder. This option should only be used in conjunction with --uris.
--roles Comma separated list of roles to export. If no roles are specified with
this option, all roles are exported.
Option Explanation
--role-users Use only with --roles. This option exports all users belonging to each
exported role.
--users Comma separated list of users to export; if no users are specified with
this options, all users are exported. Exporting a user includes all user
attributes and all roles assigned to each user.
--users-roles Use only with --users. This option exports all roles belonging to each
exported user.
--include-attributes Specify this flag to export attributes on any user or root level that is
exported.
User passwords are encrypted during the export by default, but exported catalogs may contain sensitive
data. Take appropriate measures to secure the catalog file from unauthorized access.
Examples:
Export everything in the repository:
js-export --everything --output-dir myExport
Export the /reports/interactive/CustomersReport report unit to a catalog folder:
js-export --uris /reports/interactive/CustomersReport --output-dir myExport
Export the /images and /reports folders:
js-export --uris /images /reports --output-dir myExport
Export all resources (except users, roles, and job schedules) and their permissions to a zip catalog:
js-export --uris / --repository-permissions --output-zip myExport.zip
Export all resources and report jobs:
js-export --uris / --report-jobs / --output-dir myExport
Export the report jobs of the /reports/interactive/CustomersReport report unit:
js-export --report-jobs /reports/interactive/CustomersReport --output-dir myExport
Export all roles and users:
js-export --roles --users --output-dir myExport
Export the ROLE_USER and ROLE_ADMINISTRATOR roles along with all users belonging to either
role:
js-export --roles ROLE_USER, ROLE_ADMINISTRATOR --role-users --output-dir myExport
When using the js-import command line utility, the server must be stopped to avoid issues with caches,
configuration, and security. For instructions see the JasperReports Server Community Project
Installation Guide.
Option Explanation
--input-zip Path and filename for importing a catalog from a zip file.
--update Resources in the catalog replace those in the repository if their URIs and types
match.
--skip-user-update When used with --update, users in the catalog are not imported or updated. Use
this option to import catalogs without overwriting currently defined users.
--brokenDependencies Specifies the action to take when importing a resource with a broken
dependency. One of the following values:
skip Does not import the resource with the broken dependency, but
continues to import other resources.
include Attempts to import the resource with the broken dependency. The
import succeeds if there is already a resource in the destination that satisfies
the dependency. If the dependency is not satisfied in the destination, the
resource is skipped and the import continues.
cancel Stops the import operation.
--include-access- Restores access events (date, time, and username of last modification) on
events imported resources.
Option Explanation
--include-server- Determines whether the system configuration is updated from the catalog. There
settings are two prerequisites for the catalog to contain configuration settings:
The originating server settings must be modified through the UI (Log Settings,
Ad Hoc Settings, Ad Hoc Cache, and OLAP Settings). For more information,
see8.1, Configuration Settings in the User Interface, on page124.
The catalog must be exported with the everything option from the user
interface or the command-line utility.
Imported server settings take effect when the server is started.
--skip-themes This flag is required when importing a catalog that includes a theme from a server
version 5.2 or before to version 5.5 or later. If you have a custom theme to import,
you can use the Theme UI to download it from the source server and upload it to
the target server. If your theme contains the file pageSpecific.css, you must
remove it from the ZIP file before uploading, and then redo your changes to the
file based on pageSpecific.css in the target server from 5.5 or later. For more
information, see 6.4.2, Downloading and Uploading Theme ZIP Files, on
page104.
Examples:
Import the myExport.zip catalog archive file:
js-import --input-zip myExport.zip
Import the myDir catalog folder, replacing existing resources if their URIs and types match those found in
the catalog:
js-import --input-dir myDir --update
Import the myExport.zip catalog archive file but ignore any users found in the catalog:
js-import --input-zip myExport.zip --update --skip-user-update
Import the myDir catalog folder with access events:
js-import --input-dir myDir --include-access-events
When a resource in the target repository has the same URIas on that you're importing, the default behavior is
leave the existing resource unchanged (no overwriting occurs).
To delete the existing resource and replace it with a new one (of the same type and with the same URI), use the
--update option. Note that, if the resource in the export catalog is a different type than the existing resource,
the server returns an error and skips the update operation.
When you import a user whose roles exist in the repository, the user is given those roles. User properties are
imported with the user.
When you import access events, the date and time of the last modification before export is restored on import
for every resource. The catalog folder has to be created with access events. If you don't import access events, or
if they don't exist in the imported files, the date and time of the import are used.
Alternatively, see 7.4, Alternate Import-Export Scripts, on page121 because the alternate scripts don't
require any configuration, regardless of the installation method.
Oracle users can set the sysUsername and sysPassword to the same name as dbUsername and
dbPassword in the default_master.properties. The system user name and password are not required
because js-import and js-export do not make changes to the database schema.
The imported file is handled as a ZIP archive if its name ends in .zip, otherwise it's handled as a directory. The
importArgs argument is optional and can contain more than one import option. On Linux, all double quotation
marks (") must be escaped with a backslash (\).
When performing a large import using js-ant, the server should be stopped (or put into a mode with
reduced load) to avoid issues with caches, configuration, and security.
js-ant import-help-pro
js-ant import -DimportFile=my-reports.zip
js-ant import -DimportFile=my-datasources -DimportArgs="--update"
./js-ant import-help-pro
./js-ant import -DimportFile=my-reports.zip
./js-ant import -DimportFile=my-datasources.zip -DimportArgs=\"--update\"
The export file format is a ZIP file or a set of files under a new directory name. If you specify the .zip extension
for your output filename, a ZIP archive is created automatically. Otherwise, an uncompressed directory with files
and sub-directories is created.
The exportArgs argument requires double quotation marks (") and can contain more than one export option, as
shown in these Windows examples:
js-ant export-help-pro
js-ant export -DexportFile=my-domains.zip
-DexportArgs="--uris /datasources"
js-ant export -DexportFile=my-reports-and-users.zip
-DexportArgs="--uris /reports
--users jasperadmin,joeuser"
js-ant export -DexportFile=my-datasources
-DexportArgs="--uris /datasources --roles ROLE_USER"
js-ant export -DexportFile=js-everything.zip -DexportArgs="--everything"
On Linux, all double quotation marks (") must be escaped with a backslash (\). Also, when listing user names,
enclose the list in single quotation marks ('), as shown in this Linux example:
./js-ant export-help-pro
./js-ant export -DexportFile=my-reports-and-users.zip
-DexportArgs=\"--uris /reports
--users 'jasperadmin,joeuser'\"
Use caution when editing the properties described in this chapter. Inadvertent changes may cause
unexpected errors throughout JasperReports Server that may be difficult to troubleshoot. Before changing
any files, back them up to a location outside of your JasperReports Server installation.
Do not modify settings that are not described in the documentation. Even though some settings may
appear straightforward, values other than the default may not work properly and cause errors.
In addition to configuration described in this chapter, you can configure Liferay Portal or JBoss Portal to
display the reports stored in your JasperReports Server instance. You can download the JasperReports
Server portlets for these environments from the Jaspersoft Support Portal. For information about how to
deploy the portlet, refer to the documentation in the portlet download package.
To make persistent configuration changes through the JasperReports Server user interface:
1. Log in as administrator (jasperadmin by default).
2. Select Manage > Server Settings:
3. Choose a category of settings or administrator actions from the left-hand Settings panel.
4. Find the configuration setting you want to change and edit its value. In the case of log levels, the new
value takes effect immediately. In the case of other settings, click Change beside the individual setting.
The settings and administrator actions are documented in their respective sections:
Settings Documentation
Only configuration settings that have a value modified on the Settings pages of the UI are stored and
made persistent in the database.
When the server restarts, any stored values take precedence over values for the same settings in the
configuration files. However, each setting is independent, so a value that's not modified in the Settings UI
is read from the configuration files.
The Settings pages display the values of the settings in effect on the server.
Be aware that the configuration values that appear on the Settings pages are possibly a mixture of
values loaded from configuration files and from the persistent storage.
Changing a setting that has already been modified updates its value stored internally, even if it is set to the
same original value stored in a configuration file. The stored value continues to take precedence over any
changes to this setting in the configuration file.
Figure 8-2 The Restore Defaults Page Containing Persistent Configuration Settings
The configuration values on the Restore Defaults page represent the settings that have been modified
through the UI and are stored in persistent storage.
The Restore Defaults page also includes JDBC drivers configured during the installation or through the
data source creation wizard. Do not remove the drivers with [SYSTEM] values. For more information, see
4.3, Managing JDBC Drivers, on page52.
3. To restore a setting to its configuration file default, click the icon beside its current value and confirm.
The settings listed on the Restore Defaults page are those that can be exported to different servers or re-
imported after a server upgrade. For more information, see 7.2.3, Importing From the Settings, on
page114.
Change the following settings so that JasperReports Server exposes the proxy URL.
Configuration File
.../WEB-INF/js.config.properties
Property Description
deploy.base.url Set this property to the full URL for exposing the
JasperReports Server UI through the proxy. This URL
must include the application name, for example:
http://bi.example.com/jasperserver-pro
Configuration File
.../WEB-INF/js.quartz.properties
Property Description
Sessions do not persist when redeploying a web app in the application server, only when restarting the
web app.
JasperReports Server supports a limited form of session persistence. When session persistence is enabled in the
app server, sessions can be restored in the following cases:
Browsing the repository, expanding folders in the repository tree and viewing folder contents.
Searching the repository, including all search filters and results.
Repository permissions dialog, including state and selections.
Add folder dialog.
Add resource dialogs, including adding or editing a data source, JasperReport, and other repository objects.
Copy, cut, and paste resources in the repository.
Scheduling a report, including all information such as a schedule and notifications.
If the server becomes unavailable when using the pages or dialogs above, the user will see a pause only when
performing an action on these pages, such as submitting. When the server has finished restarting, the user can
continue interacting with these UI elements. If the user takes no action while the server is unavailable, he may
not even notice the server restart.
However, for other interactive dialogs in JasperReports Server, the state is too large to store in the user session.
These features do not support session persistence and unsaved data can be lost:
Interactive report viewer - The data in the report, as well as the state of column sorting and filtering can't be
saved.
OLAP viewer - The data in the OLAP view and current MDX expression can't be restored.
Administration dialogs - When creating or editing users or roles, the information entered in a dialog can't be
restored if it was not submitted.
In the cases listed above, the user's work is interrupted, and any unsaved work is lost. However, when the server
restarts, the user does not have to log in again, the server displays a message about the session that could not be
fully restored, and redirects the user to the home page. The user must relaunch the interactive feature and
recreate any unsaved work.
Session persistence also affects web service calls. The REST API supports a login to store a session ID, and with
persistence enabled, that session ID will still be valid when the application server restarts. This simplifies the
code you need to handle timeouts. In general, web service calls do not support interactive work like designing
an Ad Hoc view, a dashboard, a Domain, or exploring data in OLAP, so they aren't affected by the lack of
session persistence in those cases. However, web service calls are affected in the following case:
Report execution - All asynchronous API calls for running and exporting reports rely on the large
JasperPrint object that can't be persisted. When the server restarts, the asynchronous calls will return errors
because the reports could not be saved in the session. Your application needs to detect this error and
include code for re-running the report.
JasperReports Server also supports session replication among multiple instances of the server in a
cluster. However, session replication has the same limitations because it is based on session
persistence. For more information, see the JasperReports Server Ultimate Guide.
The following procedure gives the configuration in JasperReports Server and the Apache Tomcat application
server to enable session persistence. For another application server, refer to that server's documentation.
<listener-class>com.jaspersoft.jasperserver.core.util.TolerantRequestContextListener
</listener-class>
<!--listener-class>org.springframework.web.context.request.RequestContextListener
</listener-class-->
<filter>
<filter-name>ClusterFilter</filter-name>
<filter-class>com.jaspersoft.jasperserver.war.TolerantSessionFilter</filter-class>
</filter>
c. Locate the corresponding mapping for the ClusterFilter and uncomment that, too. You must also
uncomment the <distributable> element below it as follows:
<filter-mapping>
<filter-name>ClusterFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<distributable/>
-Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true
Configuration File
.../WEB-INF/applicationContext-data-snapshots.xml
snapshot dataSnapshot When set to true, it allows the JasperReports Server report
Persistence Service viewer to save data snapshots in the repository and open
Enabled them the next time the report is run. By default, this is set to
false.
There is also a property named snapshotRecordingEnabled that caches a snapshot in the report
viewer memory when sorting and filtering columns interactively. This allows the report viewer to
refresh the display without querying the database every time. Regardless of persistence,
snapshotRecordingEnabled improves report viewing performance and decreases database load,
so it should remain set to true.
This report-level property depends on the snapshot mechanism in JasperReports Server. This
property has no effect in other report viewers without such a mechanism, like the viewer integrated in
Jaspersoft Studio.
There are two ways to control snapshots at the report level. In the case above:
Data snapshots are enabled on the server, so most reports use them.
Reports that don't benefit from data snapshots can explicitly disable snapshots in their own JRXML.
As with all report-level properties, you can set server-wide default values, as described in 8.6, Configuring
JasperReports Library, on page134:
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Because the report-level property takes precedence over the server-level property, this enables a second way to
control snapshots:
Data snapshots are enabled on the server.
But the server-wide default is set to false, so most reports don't use them.
Reports that benefit from data snapshots can explicitly enable snapshots in their own JRXML with:
net.sf.jasperreports.data.cache.persistable=true
Finally, when data snapshots are enabled, you can also update them through REST web services calls. When
specifying the report to run with the rest_v2/reportExecutions service, you can add arguments to explicitly
update or not update the associated data snapshot. For more information, see the JasperReports Server Web
Services Guide.
We set up one AWS DB Security Group (using IP address) in each RDS region, per JasperReports
Server instance. The security group allows connections from the specific JasperReports Server
instance to the specified AWS database instance.
4. Modify the following settings and click Change after each modification. Changes are effective
immediately on the server:
Automatically Set Up an Access Rule for JasperReports Server: This check box is generally left
checked. When checked the JasperReports Server will automatically create and update an access rule
that allows connections from JasperReports Server to the database hosted by the cloud service provider.
If you want to manage access rules manually, uncheck this box.
Access Rule Name: When JasperReports Server creates access rules to support cloud-based data
sources on this instance, it will use this name as the basis of the access rule name. When the
JasperReports Server instance is running on AWS EC2, the EC2 instance ID will be appended. When
running outside of AWS EC2, you must make sure that name is unique among JasperReports Server
instances (i.e., each instance should have its own name), so the IP addresses are properly granted access
to the appropriate database instances.
Access Rule Description: This text will be used as the description for the access rule.
JasperReports Server Public IP: Enter the public IP address for JasperReports Server. Most users on
AWS EC2 should leave the this field empty and let JasperReports Server determine the IP address
automatically. It is possible with complex EC2 topology involving Virtual Private Clouds (VPCs) that
you need to provide your IP address manually.
Suppress EC2 Credentials Warning: If your JasperReports Server instance was created with no
IAM role, when you go to the data source wizard to add an AWS data source with EC2 credentials
there will be a warning message saying there is no proper role set. Checking this box suppresses the
warning and disables the option.
8.5.2 Changing the Default JDBC Driver for AWS Data Sources
When adding an AWS data source, JasperReports Server uses the JDBC driver specified in the .../WEB-
INF/applicationContext-webapp.xml file. You can configure JasperReports Server to use a different JDBC driver.
<entry key="mysql">
<util:map>
...
<entry key="jdbcUrl" value="jdbc:mysql://$[dbHost]:$[dbPort]/$[dbName]"/>
<entry key="jdbcDriverClass" value="org.mariadb.jdbc.Driver"/>
...
</util:map>
Configuration File
.../WEB-INF/applicationContext-azure-sql-datasource.xml
Bean Description
defaultAzureJdbcDriverClassName The JDBC driver used for Azure SQL Server data sources. The
default is the native JDBC driver for SQL Server
(tibcosoftware.jdbc.sqlserver.SQLServerDriver).
defaultAzureJdbcUrlSyntax The template for the JDBC connector URL for Azure SQL Server
data sources. The connector string contains properties required for
the JDBC driver to access the Azure data source. The default string
specifies the server name, database name, and the use of SSL as
an encryption method.
Configuration File
.../WEB-INF/applicationContext-webapp.xml
Bean Description
defaultAzureKeyStoreType The file format for storing the certificate key exchange files used for
Azure data sources. The default file format is pkcs12.
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
We recommend that you create your chart themes in Jaspersoft Studio. Click File > New > Other > Chart
Theme, then use Jaspersoft Studio to archive the new chart theme as a JAR.
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Changing this setting in this configuration file changes the behavior for the entire server. To configure this
behavior at the report, table, or column level, edit the report's JRXML properties in Jaspersoft Studio.
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Changing this setting in this configuration file changes the behavior for the entire server. To configure this
behavior at the report level, edit the report's JRXML properties in Jaspersoft Studio.
HTML Exporters
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Note that the properties are mutually exclusive; you can have only one uncommented at a time.
As of JasperReports Server version 5.5, if your reports include interactive elements such as the table
component (which supports sorting and filtering in the HTML viewer), you must use the html2 exporter to
enable the interactive features; the html and xhtml exporters don't support them.
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Note that this property applies only to reports that rely on Pro Charts and affects only the HTML preview and
export.
Typically, this property is set at the server level; to override the server-level setting for a specific Pro Chart
report, set this property at the report level, and also specify a second property as shown:
net.sf.jasperreports.print.transfer.fusion=com.jaspersoft.jasperreports.fusion
This allows the reporting engine, JasperReports Library, to recognize the Fusion settings. If this property isn't
set, the com.jaspersoft.jasperreports.fusion.charts.render.type property is ignored at the report
level.
Once PhantomJS is installed, point JasperReports Server to its location. You can configure several processes to
use PhantomJS: HighCharts generation, Pro Charts generation (including Pro Widgets and Pro Maps), and
exporting dashboards.
These are a server-wide settings. In a given server, all charts of the same type (HighCharts or Fusion
(Charts Pro, Maps Pro, or Widgets Pro)) must use the same JavaScript engine.
You can't use PhantomJS to render JFreeCharts. Such reports are always generated by Rhino when run
in the background or scheduled.
To configure JasperReports Server to use PhantomJS for HighCharts, edit the following properties:
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
com.jaspersoft.jasperreports. This property points to the engine the server should use to
highcharts.phantomjs. generate HighCharts-based charts in reports run in the
executable.path background or scheduled.
For example, if you're using Windows and you expanded the
PhantomJS 2.0 ZIP file into the root of your C: drive:
com.jaspersoft.jasperreports.highcharts.
phantomjs.executable.path=C:\\phantomjs-2.0-
windows\\phantomjs.exe
To configure JasperReports Server to use PhantomJS for Pro Charts (Fusion), including Pro Widgets and Pro
Maps, edit the following properties:
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
com.jaspersoft.jasperreports. This property points to the engine the server should use to
fusion.phantomjs. generate Pro Charts (based on Fusion) in reports run in the
executable.path background or scheduled.
For example, if you are using Windows and you expanded the
PhantomJS 2.0 ZIP file into the root of your C: drive:
com.jaspersoft.jasperreports.fusion.
phantomjs.executable.path=C:\\phantomjs-2.0-
windows\\phantomjs.exe
By default, when Fusion-based reports are viewed in the web UI, they are generated as Flash elements.
You can configure the web UI to generate your reports using HTML5 instead. For details, see 8.6.7,
Enabling Flash or HTML5 for Pro Charts, on page138.
PhantomJS can also be used to render dashboards when exporting them to a PNG, PDF, ODT, or DOCX file. To
support Japanese and Chinese fonts, as well as certain icons in dashboard output, Jaspersoft recommends using
PhantomJS 2.0 or later.
To configure JasperReports Server to use PhantomJS for exporting dashboards, edit the following property:
Configuration File
.../WEB-INF/js.config.properties
Property Description
phantomjs.binary This property points to the engine the server should use to
generate dashboards when exporting.
For example, if you are using Windows and you expanded the
PhantomJS 2.0 ZIP file into the root of your C: drive:
phantomjs.binary=C:\\phantomjs-2.0-
windows\\phantomjs.exe
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property
Each property that ends in $context.url may also have a similar property ending in $url. The $context.url
property is used when a request object is available to resolve a context path for the HTML export, and the $url
property is used as a fallback.
Not all library paths are defined in the jasperreports.properties file. Some are provided by the environment (such
as com.jaspersoft.jasperreports.highcharts.jquery.ui.js), and others are set programmatically by
the bean com.jaspersoft.ji.adhoc.jr.AdhocHighchartsSetting-ServiceBundle (in the .../WEB-
INF/applicationContext-adhoc.xml file).
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
This property can also be set at the report level or table component level to control the automatically generated
metadata.
Configuration File
.../WEB-INF/applicationContext-cascade.xml
Bean Description
applyRegexpToEmptyString The default value of false gives the traditional behavior: even if
a regular expression is defined, it is not applied to empty strings.
If you want to strictly enforce the regular expression, even on
empty input strings, set this property to true.
You can also configure the default value that appears in each type of input control. This is the value that is
displayed when the input control is not given any value. By default, the display value is ~NULL~.
Edit the file .../WEB-INF/applicationContext-cascade.xml to change the following entries. The examples in
comments show how you can use the default value to suggest a pattern for the input. To make an input control
appear blank when no value is given, set value="" (an empty string).
Configuration File
.../WEB-INF/js.quartz.properties
Property Description
report.quartz.misfirepolicy. Sets the misfire policy for single jobs to one of the following:
singlesimplejob SMART_POLICY
MISFIRE_INSTRUCTION_FIRE_NOW
MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
report.quartz.misfirepolicy. Sets the misfire policy for repeating jobs to one of the following
repeatingsimplejob values:
SMART_POLICY
MISFIRE_INSTRUCTION_FIRE_NOW
MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
MISFIRE_INSTRUCTION_RESCHEDULE_NEXT_WITH_
EXISTING_COUNT
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_
EXISTING_REPEAT_COUNT
MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_
REMAINING_REPEAT_COUNT
report.quartz.misfirepolicy. Sets the misfire policy for jobs with calendar recursion to one of
calendarjob the following values:
SMART_POLICY
MISFIRE_INSTRUCTION_IGNORE_MISFIRE_POLICY
MISFIRE_INSTRUCTION_FIRE_ONCE_NOW
MISFIRE_INSTRUCTION_DO_NOTHING
Configuration File
.../WEB-INF/applicationContext-report-scheduling.xml
administrator quartz This setting determines the role to which the scheduler failure
Role Scheduler notifications will be sent. All users with this role and a valid
email address defined in their user profile will receive the
email notification. By default, this setting is ROLE_
ADMINISTRATOR.
If you turn on scheduler file system output, make sure you have configured user and folder access rights
to make sure that malicious files cannot be written to your file system. The process that writes the files is
the same user that runs the application server hosting JasperReports Server.
Configuration File
.../WEB-INF/applicationContext.xml
This property also determines the scheduler's overall access to the file
system. When true, any schedule configured with a file system folder
will write to the file system. When false, no scheduled reports will write
output to the file system (FTP and email output are not affected).
However, any file system output specified in a schedule remains
defined and will again trigger file system output when this property is
true again.
Configuration File
.../WEB-INF/flows/reportJobBeans.xml
To remove a temporal interval, enclose the corresponding bean in comment characters. For example, to keep
users from scheduling reports at minute intervals, comment out the bean containing the INTERVAL_MINUTE field:
<!--
<bean class="com.jaspersoft.jasperserver.war.dto.ByteEnum">
<property name="code">
<util:constant static-field="com.jaspersoft.jasperserver.api.engine.scheduling.
domain.ReportJobSimpleTrigger.INTERVAL_MINUTE"/>
</property>
<property name="labelMessage">
<value>job.interval.unit.minute.label</value>
</property>
</bean>
-->
PUT http://<host>:<port>/jasperserver[-pro]/rest_v2/jobs/calendars/2014FrenchHolidays
Content-Type: application/xml
For example, using the Poster plug-in for Firefox, you can submit this request as shown in the following figure.
The figure also shows the successful reply from the server.
Then you should see your new calendar in the list of calendars in the Schedule tab.
The REST API supports other types of calendars, however, the user interface lists only calendars of type
holiday. Using the REST API, you can create and manage any number of calendars and update any schedule to
use them. For more information, see the JasperReports Server Web Services Guide.
Report Thumbnails
Configuration File
.../WEB-INF/js.spring.properties
Property Description
Heartbeat Options
Configuration File
.../WEB-INF/js.config.properties
Property Description
All of these settings are properties that are substituted into the heartbeatBean in the .../WEB-
INF/applicationContext-heartbeat.xml file.
Configuration File
.../WEB-INF/applicationContext-webHelp.xml
showHelp webHelp Determines whether the help links are displayed in the JasperReports
Server web UI. Valid values are true and false.
The Help link appears at the top right corner of the web UI's pages.
hostURL webHelp Indicates the name of the computer hosting the web server where the
help is running. The value depends on the version of JasperReports
Server. Do not change this value.
pagePrefix webHelp Defines the default page name to pass to the web server hosting the
help system. The only valid value is Default_CSH.htm for this property.
helpContextMap webHelp Maps contexts in the application to topic identifiers in the help system.
Many pages in the web application are configured for context-sensitivity.
When a user clicks Help on such a page, JasperReports Server loads a
specific topic in the help system. The topic that appears is determined by
a map in the applicationContext-webHelp.xml file. The only valid values
are the defaults.
The page lists some of the currently-enabled loggers with their logging level. Any change to the logging levels
takes effect immediately, without restarting JasperReports Server.
These logging levels override the levels in the log4j.properties file. As of JasperReports Server version
5.0, these settings persist even when the server is restarted. Therefore the values on the Log Settings
page that are in effect on the server may differ from settings in the log4j.properties file. For details, see 8.1,
Configuration Settings in the User Interface, on page124.
The four logging levels indicate the type of event recorded by a logger:
ERROR Writes minimal information to the log, only when describing serious program faults.
WARN Writes error and warning messages to the log. Warning messages contain cautionary
information to help you to decide whether the logged events require your attention.
INFO Writes error, warning, and informational messages to the log describing significant events, such
as those that affect application performance.
DEBUG Writes error, warning, informational, and additional messages to the log. Debug messages are
very detailed and often voluminous. Use this setting only to diagnose a problem. DEBUG can
impact system performance and should not be used in production environments. If several
loggers are set to DEBUG, the server may generate huge logs, and performance can suffer.
JasperReports Server's default root logger setting is ERROR, as configured in log4j.properties. A logger without
an assigned value inherits the setting of its parent in log4j.properties.
The following table lists each logger name as it appears on the Log Settings page, the identifier used to find it
in the log file, and a description of the logger.
SQL query executer JRJdbcQueryExecuter Logs SQL text and parameter values for queries that
are run by the SQL query executer.
Input control value valueQueryLog Logs SQL text and parameter values for queries
queries associated with input controls.
Cascading input TokenControlLogic Logs use of the cache for results of cascading input
control query result control queries.
caching
Profile attributes ProfileAttributesResolverImpl Determines the values of attributes when they are
resolver referenced.
Hibernate SQL SQL Logs SQL run by the Hibernate layer to access the
JasperReports Server repository database. This
logger generates a large volume of logging that
could affect performance.
You can add other loggers to the Log Settings page if you know their classnames.
If you've made modifications in the Log Settings UI, those settings are persistent in the repository, and take
precedence over the configuration files. However, these changes are not written to the configuration files. Each
setting is independent, so a value that's not modified in the Log Settings UI is taken from the corresponding file.
For more information, see 8.1, Configuration Settings in the User Interface, on page124.
Logger names are defined in the Java source. Loggers can have any name, but the Jaspersoft convention is to
give them their full class names. In the log4j.properties file, the classname must be preceded by log4j.logger.
For example, the classname org.acegisecurity.intercept is represented in the log4j.properties file as
log4j.logger.org.acegisecurity.intercept. If you want to add a new logger, find its classname in the
source.
The file you edit depends on whether you're configuring server logging or logging during import and export.
If the logger is defined in the configuration file but commented out, simply remove the comment character (#) to
add the logger. Otherwise, add the logger's classname and set the logging level.
The form of a logger definition should be:
log4j.logger.<logger-classname> = <log-level>, <output-type>
where:
<logger-classname> is the name of the class you want to monitor.
<log-level> is ERROR, WARN, INFO, or DEBUG
<output-type> is a standard output type, such as stdout. For example:
log4j.logger.org.springframework.webflow=DEBUG, stdout, fileout
Because editing text files can be error-prone, we recommend that you add loggers from the web interface
by entering them into the text field on the Log Settings page. Edit the configuration file only if you need to
permanently add the logger.
The logger_descriptions_pro.properties file controls the labels for the English locale. You can specify
labels for other locales by editing the logger description property files for those locales. For example, to
add the label in French, add an entry to the logger_descriptions_pro_fr.properties file. For more
information on supporting other languages, refer to Appendix B, Localization, on page173.
Configuration File
.../WEB-INF/applicationContext.xml
If you are using JNDI data sources, you can configure the number of connections in your application server. For
more information, see the sections on JNDI in A.10, Working With Data Sources, on page163.
Configuration File
.../scripts/dashboard.designer.js
Property Description
Configuration File
<tomcat>/conf/server.xml
Property Description
In case a job fails on the first node, the check-in interval is meant to ensure that the job runs on a second node
after this delay. Because the schedulers do not communicate directly, the second scheduler cannot distinguish
between a node that had a failure and a node that is still running a job. The default value corresponds to 15
minutes.
This parameter can be adjusted as follows:
If you have scheduled reports that take a long time to run, longer than 15 minutes, you may see multiple
emails. Increase this parameter to an interval longer than your longest report's expected run-time.
On the other hand, if you have small reports that finish quickly, the default value means that any scheduler
or node problem isn't detected by the other scheduler before 15 minutes. If you have time-critical reports
scheduled, you can lower this parameter, but the value should still exceed your longest expected report run-
time.
Restart all of your server instances after changing this parameter.
<props>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.smtp.sendpartial">true</prop>
...
</props>
Name : nss
Arch : x86_64
Version : 3.19.1
Release : 3.el6_6
Configuration File
.../WEB-INF/applicationContext-report-scheduling.xml
Configuration File
.../WEB-INF/classes/jasperreports.properties
This property can also be defined on individual elements in the report's JRXML if only certain fields should
apply the timezone.
Configuration File
.../WEB-INF/classes/jasperreports.properties
Property Description
Check that your database server is available and accepting TCP/IP connections from the host where
JasperReports Server is installed.
Check in your RDBMS that the username and password you're using are correct and have access to the
selected database.
Check for firewalls or network connectivity errors.
Many databases, including MySQL, also require the user grants to include the specific host from which
connections are allowed. Otherwise, when testing the JDBC connection, a connection may not be allowed even
though the username and password are correct. For more information, refer to the MySQL documentation for
setting up users.
An easy way to test connectivity from the server to the database with a particular user is to use a tool such as
SQuirreL or another DB query tool to connect to the database from the host of your JasperReports Server
instance.
Configuration File
.../META-INF/jboss-deployment-structure.xml
Property Description
resource-root path="<driver>.jar" Locate the resource root element for the JDBC driver you
added and uncomment it. The name of the JAR file must
match exactly the name of the JDBC driver that you
upload. You can add a new resource root element if the
JDBC driver of your choice is not given in the commented
list.
3. Restart JBoss.
su - postgres
psql -U postgres
Many databases, including MySQL, also require that the user permissions name the specific host from
which connections are allowed. Otherwise, when testing the JDBC connection, a connection may not be
allowed even though the user name and password are correct. For example, see the MySQL documentation
for setting up users.
A fairly easy way to test permissions and connectivity is to use a tool such as SquirrelSQL or another DB query
tool to connect to the database from the same host as JasperReports Server and to run typical queries against
your database.
PostgreSQL jdbc:postgresql://<host>:5432/<db-name>
Ingres jdbc:ingres://<host>:II7/<db-name>;CURSOR=READONLY;auto=multi
Oracle jdbc:oracle:thin:@<host>:1521:orcl
DB2 jdbc:db2://<host>:50000/<db-name>:driverType=4;currentSchema=<schema-
name>;fullyMaterializeLobData=true;fullyMaterializeInputStreams=true;
progressiveStreaming=2;progresssiveLocators=2
Vertica jdbc:vertica://<host>:5433/<db-name>
Informix jdbc:informix-sqli://<host>:1526/<db-name>:INFORMIXSERVER=<server-name>
Vertica jdbc:sybase:Tds:<host>:5433?ServiceName=<service-name>
For example, the following query does not work with the TIBCO JDBC drivers:
For more information, see the Progress DataDirect page on scalar functions.
For tomcat 7 and tc Server 2.9 users, copy the zzuTIsforce-5.14.jar file.
This driver is currently not supported on WebSphere Application Server and WebLogic.
<tomcat>/webapps/jasperserver-pro/WEB-INF/web.xml
<resource-ref>
<description>JNDI Example</description>
<res-ref-name>jdbc/<db-name></res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
driverClassName="oracle.jdbc.OracleDriver"
validationQuery="SELECT 1 FROM dual"
accessToUnderlyingConnectionAllowed="true"
<resource-description>
<res-ref-name>TestDatabase</res-ref-name>
<jndi-name>jdbc/testDatabase</jndi-name>
</resource-description>
<resource-ref>
<description>TestDatabase database</description>
<res-ref-name>TestDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
3. In the WebLogic Admin Console, add a data source with TestDatabase as the JNDI name.
4. Restart the jasperserver-pro instance using the WebLogic Admin Console.
4. Copy the file sqljdbc_auth.dll to the folder your app server automatically searches for DLLs.
For Tomcat, this is the <tomcat>\bin folder.
5. Restart your app server.
6. Log into JasperReports Server as an administrator.
7. Right-click the Data Sources folder and select Add Resource > Data Source from the context menu.
8. In the Type field, select JDBC Data Source. The page refreshes to show the fields necessary for a JDBC
data source.
9. Enter a name and optional description for your data source.
10. From the dropdown field, select com.microsoft.sqlserver.jdbc.SQLServerDriver.
11. Enter the database hostname and database name of your SQL Server instance.
12. In the URL field, add the following string to the end of the generated URL:
;integratedSecurity=true
13. In the User Name field, enter any non-blank string you want, for example none.
14. In the Password field, enter any non-blank string you want, for example none.
15. Set the Time Zone and Save Location fields if necessary.
16. Click Test Connection and verify that the connection works.
17. Click Save to save the data source in the repository.
The following code worked before but will now cause an error:
Because the first call is a method which is part of the ReportDataSourceServiceFactory, the cast is
unnecessary; to fix it, just leave it out:
jdbcDSSF.createService();
You don't have to change the declaration in MyBean because Spring will generate a dynamic proxy
implementing MyDSSF, but if you change the declaration, the code will be easier to understand because no casts
will be necessary:
This is a known error with the WebSphere Adapter(RRA) component. The error message appears in the log file,
but it has no impact on functionality. The fix is currently targeted for inclusion in WAS fix pack 8.5.5.1. Please
refer to IBM's Recommended Fixes for WebSphere Application Server page for delivery information.
Cassandra clusters use partition keys to split data between nodes, but this imposes a certain segmentation of the
data. This segmentation is not compatible with all filtering, because it would be very inefficient. Therefore, the
definition of the partition keys in your Cassandra schema limits you to certain comparison operations on certain
fields.
In general you should avoid comparison operators other than strict equality in filters on Cassandra data sources.
The Cassandra reference documentation recommends not using the IN comparison "under most conditions."
For more details, see the Cassandra documentation of the SELECT WHERE clause in CQL(Cassandra Query
Language).
To configure a Microsoft Windows computer (XP and later) for East Asian fonts:
Configuration File
.../WEB-INF/adhoc/themes/default.new.jrxml
style name= "DejaVu Sans" The default value, DejaVu Sans, does not
"ChartLegend" <default> include kana glyphs, and thus the legend
fontName= contains blank symbols.
"SansSerif" If the server machine has system Japanese
fonts available, setting the value to SansSerif
should work in most Java font configurations.
After making changes to the default.new.jrxml file, you must rerun all Ad Hoc reports that contain
Japanese characters for them to appear.
If Japanese fonts are not installed in the server machine, you can add it in the following manner:
1. Package a Japanese font as a font extension JAR.
2. Add the new JAR to the .../WEB-INF/lib folder of the JasperReports Server WAR file.
3. Edit the default.new.jrxml file as described above to specify the new font name.
4. Redeploy JasperReports Server or restart its app server.
5. Rerun the affected reports. Reports saved from Ad Hoc should now display correctly in the Report Viewer,
but the corresponding view may not display chart legends correctly within the Ad Hoc Editor.
JAJ_000_jsp.jpivot.chartpropertiesform.sansSerif=SansSerif
JAJ_000_jsp.jpivot.chartpropertiesform.serif=Serif
JAJ_000_jsp.jpivot.chartpropertiesform.monospaced=Monospaced
If you are using Jaspersoft OLAP Community Edition, the name of the file and the keys that you edit are
different. For the Community Edition, open the jpivot_internal_message.properties file and edit these
keys:
jsp.wcf.chart.sansserif=SansSerif
jsp.wcf.chart.serif=Serif
jsp.wcf.chart.monospaced=Monospaced
3. Change one or more of the strings to the name of a font available in the host's operating system. For
example, if you wanted to change the SansSerif font to the SimHei font, edit the value specified by
jsp.wcf.chart.sansserif. For example:
jsp.wcf.chart.sansserif=SimHei
By default, JasperReports Server can create PDF (Portable Document Format) files with many different
fonts. However, if you experience font problems in the PDF output, you may need to take the steps
described in this section to make the fonts available to JasperReports Server's XSL Formatting Object
(XSL-FO) processor.
You must have distribution rights to a font in order to embed it in a PDF file.
When users save reports in PDF format, JasperReports Server generates the PDF output using Apache FOP
(Formatting Objects Processor). In order for FOP to render fonts properly, you must install the font itself (for
example, a TTF file) on the server host, create a font metrics file (using Apache's
org.apache.fop.fonts.apps.TTFReader utility), and update the userConfig.xml file to associate the font
with its metrics. For more information, refer to the Apache FOP documentation.
You can embed any Unicode font using this procedure, though larger font files may have significantly larger
memory footprints. To keep memory requirements small, we recommend you use the smallest font file you can,
such as SimHei to support Chinese, Japanese, and Korean.
B.2.1 Tomcat
By default, Tomcat uses ISO-8859-1 (ISO Latin 1) character encoding for URIs, which is sufficient for Western
European locales, but does not support many locales in other parts of the world.
If you plan to support locales that Latin 1 does not support, you must change Tomcat's URI encoding format.
If you chose the instance of Tomcat that is bundled with the installer, you don't need to make this change.
The bundled Tomcat is preconfigured to support UTF-8. If you installed the WAR file distribution with your
own instance of Tomcat and want to support UTF-8, follow this procedure.
2. At the end of this section, insert the following line before the closing tag:
URIEncoding="UTF-8"
B.2.2 JBoss
Because JBoss uses Tomcat as its web connector, the configuration changes in B.2.1, Tomcat, on page177)
also have to be made for JBoss. The only difference is that the server.xml file is located in the Tomcat
deployment directory, typically server/default/deploy/jbossweb-tomcat55.sar. Make the same configuration
changes, then restart JBoss.
B.2.3 PostgreSQL
JasperReports Server requires PostgreSQL to use UTF-8 character encoding for the database that stores its
repository as well as for data sources. A simple way to meet the requirement is to create the database with a
B.2.4 MySQL
By default, MySQL uses ISO-8859-1 (ISO Latin 1) character encoding. However, JasperReports Server requires
MySQL to use UTF-8 character encoding for the database that stores its repository as well as for data sources.
The simplest way to meet the requirement is to create the database with a UTF-8 character set. For example,
enter the following command:
To support UTF-8, the MySQL JDBC driver also requires that the useUnicode and characterEncoding
parameters be set as in this startup URL:
url="jdbc:mysql://localhost:3306/jasperserver?useUnicode=true&characterEncoding=UTF-8"
If the MySQL database is a JNDI data source managed by Tomcat, such as the JasperReports Server repository
database, the parameters can be added to the JDBC URL in .../WEB-INF/context.xml. The following is a sample
resource definition from that file:
JBoss ignores the context.xml file, instead requiring an XML file to define JNDI data sources in the deployment
directory, which is typically server/default/deploy. The following is an example of a resource definition in one
of those XML files:
<local-tx-datasource>
<jndi-name jdbc/jasperserver />
<connection-url>
jdbc:mysql://localhost/jasperserver?useUnicode=true&characterEncoding=UTF-8
</connection-url>
<driver-class com.mysql.jdbc.Driver />
<user-name jasperadmin />
<password jasperadmin />
<min-pool-size 5 />
<max-pool-size 20 />
<idle-timeout-minutes 0 />
<metadata>
<type-mapping mySQL />
</metadata>
</local-tx-datasource>
If the database is a JDBC data source configured in the repository, change the JDBC URL by editing the data
source in the JasperReports Server repository. The following is an example of the JDBC URL (note that the
ampersand isn't escaped):
jdbc:mysql://localhost:3306/foodmart_ja?useUnicode=true&characterEncoding=UTF-8
B.2.5 Oracle
Oracle databases have both a default character set and a national character set that supports Unicode characters.
Text types beginning with N (NCHAR, NVARCHAR2, and NCLOB) use the national character set. All the text
data used by the JasperReports Server repository (when stored in Oracle) is stored in NVARCHAR2 columns, so
that JasperReports Server metadata can use the full Unicode character set. For more information about Unicode
text support, refer to the Oracle white paper (PDF).
To work properly with Unicode data, the Oracle JDBC driver requires you to set a Java system property by
passing the following argument to the JVM:
-Doracle.jdbc.defaultNChar=true
Because JBoss also uses JAVA_OPTS to pass options to the JVM, you can add the same line to bin/run.sh
(Linux) and bin/run.bat (Windows). Add it before this line:
Linux # Setup the java endorsed dirs
Windows rem Setup the java endorsed dirs
<bean id="encodingProvider"
class="com.jaspersoft.jasperserver.api.common.util.
StaticCharacterEncodingProvider">
<constructor-arg value="UTF-8" />
</bean>
2. Change "UTF-8" to the encoding type your database server and application server use. For example:
<bean id="encodingProvider"
class="com.jaspersoft.jasperserver.api.common.util.
StaticCharacterEncodingProvider">
<constructor-arg value="UTF-16" />
</bean>
2. The URL of any OLAP data source that JasperReports Server accesses must be properly configured in the
.../META-INF/context.xml file. For example, the URL definition for the Foodmart sample database might
be similar to the following:
<Resource name="jdbc/MondrianFoodMart_ja"
auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="postgres" password="postgres" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/foodmart_ja" />
3. Encoding options must be added to the JDBC connection string for any data source that points to an OLAP
database. For example, when creating a data source in JasperReports Server that points to an OLAP
database, use the following connection string:
jdbc:postgresql://localhost:5432/foodmart_ja
.properties .
HomeBundle.properties Labels for the new home page introduced in version 5.5.
image_descriptions_messages Labels and messages for the AWS (Amazon Web Services) machine
.properties images.
jasperserver_messages.properties Labels and messages used in the main JasperReports Server user
interface.
jsexceptions_messages.properties Messages used in errors and exceptions, both in the UI and in the log
messages.
pro_nav_messages.properties Labels and messages for the menu bar and old Home page.
mondrian_exception_messages MDX validation error messages specific to the internal analysis engine.
.properties
The standalone import and export tools have their own bundles located outside of the web app. The following
bundles are located in the WAR file distribution package, under the buildomatic folder.
File in buildomatic/conf_
Description
source/ieCe/bundles
jsexceptions_messages.properties Messages used in errors and exceptions, both in the UI and in the log
messages.
If you use the JasperReports Server portlet to display JasperReports Server content in a portal (such as Liferay),
the deployed portlet includes properties files, as well:
where
<default_file_name> is the name of the default version of the properties file, and
<locale> is a Java-compliant locale identifier.
For example, consider the core JasperReports Server resource bundle. For various locales, it might be named as
follows:
French jasperserver_messages_fr.properties
The resource bundles described in this document consist of locale-specific Java properties files. Java
properties files use the ISO-8859-1 (Latin-1) encoding that is the same as ASCII for all English non-
accented characters. For international characters that are not in ISO-8859-1, use Unicode escape
sequences (for example \u00e9 is ).
The new locale is not available in JasperReports Server until you follow the steps described in B.5.1,
Specifying Additional Locales, on page185.
date.format=dd-MM-yyyy
datetime.format=dd-MM-yyyy HH:mm
calendar.date.format=%d-%m-%Y
calendar.datetime.format=%d-%m-%Y %H:%M
The first two keys are used to parse and format dates and datetime values using an internal
java.util.DateFormat object across the whole application. These patterns should be non-localized date
patterns, in accordance with the Java Development Kit (JDK) syntax.
The other two keys are used by the calendar control, which formats the user-selected date and datetime values in
accordance with its own pattern syntax.
To change the system date and datetime formatting for a new locale, edit the strings specified by these keys.
<bean id="userLocalesList"
class="com.jaspersoft.jasperserver.war.common.LocalesListImpl">
<property name="locales">
<list>
<value type="java.util.Locale">en</value>
<value type="java.util.Locale">fr</value>
<value type="java.util.Locale">it</value>
<value type="java.util.Locale">de</value>
<value type="java.util.Locale">ro</value>
<value type="java.util.Locale">ja</value>
<value type="java.util.Locale">zh_TW</value>
</list>
</property>
</bean>
2. Add the new locale to the end of the list. For example, add the following line for Dutch (Java's nl_NL
locale):
<value type="java.util.Locale">nl_NL/value>
<bean id="userTimeZonesList"
class="com.jaspersoft.jasperserver.war.common.JdkTimeZonesList">
<property name="timeZonesIds">
<list>
<value>America/Los_Angeles</value>
<value>America/Denver</value>
<value>America/Chicago</value>
<value>America/New_York</value>
<value>Europe/London</value>
<value>Europe/Berlin</value>
<value>Europe/Bucharest</value>
</list>
</property>
</bean>
2. Add the new time zone to the bottom of the list. Specify each time zone as the standard Java time zone
values so that JasperReports Server adjusts for daylight savings time when appropriate. For example, add the
following line for Tokyo:
<value>Asia/Tokyo</value>
Operatin
App
g File Setting
Server
System
Operatin
App
g File Setting
Server
System
Audit Logging
When auditing is enabled, audit logging is the active recording of who used JasperReports Server to do what
when. The system installer can configure what activities to log, the amount of detail gathered, and when to
archive the data. Audit logs are stored in the same private database that JasperReports Server uses to store the
repository, but the data is only accessible through the audit Domains.
Auditing
A feature of JasperReports Server Enterprise edition that records all server activity and allows administrators to
view the data.
Calculated Field
In an Ad Hoc view or a Domain, a field whose value is calculated from a user-defined formula that may include
any number of fields, operators, and constants. For Domains, a calculated field becomes one of the items to
which the Domain's security file and locale bundles can apply. There are more functions available for Ad Hoc
view calculations than for Domains.
CRM
Customer Relationship Management. The practice of managing every facet of a company's interactions with its
clientele. CRM applications help businesses track and support their customers.
CrossJoin
An MDX function that combines two or more dimensions into a single axis (column or row).
Cube
The basis of most OLAP applications, a cube is a data structure that contains three or more dimensions that
categorize the cube's quantitative data. When you navigate the data displayed in an OLAP view, you are
exploring a cube.
Custom Field
In the Ad Hoc Editor, a field that is created through menu items as a simple function of one or two available
fields, including other custom fields. When a custom field becomes too complex or needs to be used in many
reports, it is best to define it as a calculated field in a Domain.
Dashboard
A collection of reports, input controls, graphics, labels, and web content displayed in a single, integrated view.
Dashboards often present a high level view of your data, but input controls can parametrize the data to display.
For example, you can narrow down the data to a specific date range. Embedded web content, such as other web-
based applications or maps, make dashboards more interactive and functional.
Dashlet
An element in a dashboard. Dashlets are defined by editable properties that vary depending on the dashlet type.
Types of dashlet include reports, text elements, filters, and external web content.
Data Island
A single join tree or a table without joins in a Domain. A Domain may contain several data islands, but when
creating an Ad Hoc view from a Domain, you can only select one of them to be available in the view.
Data Policy
In JasperReports Server, a setting that determines how the server processes and caches data used by Ad Hoc
reports. Select your data policies by clicking Manage > Server > Settings Ad Hoc Settings. By default, this
setting is only available to the superuser account.
Data Source
Defines the connection properties that JasperReports Server needs to access data. The server transmits queries to
data sources and obtains datasets in return for use in filling reports and previewing Ad Hoc reports.
JasperReports Server supports JDBC, JNDI, and Bean data sources; custom data sources can be defined as well.
Dataset
A collection of data arranged in columns and rows. Datasets are equivalent to relational results sets and the
JRDataSource type in the JasperReports Library.
Datatype
In JasperReports Server, a datatype is used to characterize a value entered through an input control. A datatype
must be of type text, number, date, or date-time. It can include constraints on the value of the input, for example
maximum and minimum values. As such, a datatype in JasperReports Server is more structured than a datatype
in most programming languages.
Denormalize
A process for creating table joins that speeds up data retrieval at the cost of having duplicate row values
between some columns.
Derived Table
In a Domain, a derived table is defined by an additional query whose result becomes another set of items
available in the Domain. For example, with a JDBC data source, you can write an SQL query that includes
complex functions for selecting data. You can use the items in a derived table for other operations on the
Domain, such as joining tables, defining a calculated field, or filtering. The items in a derived table can also be
referenced in the Domain's security file and locale bundles.
Dice
An OLAP operation to select columns.
Dimension
A categorization of the data in a cube. For example, a cube that stores data about sales figures might include
dimensions such as time, product, region, and customer's industry.
Domain
A virtual view of a data source that presents the data in business terms, allows for localization, and provides
data-level security. A Domain is not a view of the database in relational terms, but it implements the same
functionality within JasperReports Server. The design of a Domain specifies tables in the database, join clauses,
calculated fields, display names, and default properties, all of which define items and sets of items for creating
Ad Hoc reports.
Domain Topic
A Topic that is created from a Domain by the Data Chooser. A Domain Topic is based on the data source and
items in a Domain, but it allows further filtering, user input, and selection of items. Unlike a JRXML-based
Topic, a Domain Topic can be edited in JasperReports Server by users with the appropriate permissions.
Drill
To click on an element of an OLAP view to change the data that is displayed:
Drill down. An OLAP operation that exposes more detailed information down the hierarchy levels by
delving deeper into the hierarchy and updating the contents of the navigation table.
Drill through. An OLAP operation that displays detailed transactional data for a given aggregate measure.
Click a fact to open a new table beneath the main navigation table; the new table displays the low-level
data that constitutes the data that was clicked.
Drill up. An OLAP operation for returning the parent hierarchy level to view to summary information.
Eclipse
An open source Integrated Development Environment (IDE) for Java and other programming languages, such as
C/C++.
ETL
Extract, Transform, Load. A process that retrieves data from transactional systems, and filters and aggregates the
data to create a multidimensional database. Generally, ETL prepares the database that your reports will access.
The Jaspersoft ETL product lets you define and schedule ETL processes.
Fact
The specific value or aggregate value of a measure for a particular member of a dimension. Facts are typically
numeric.
Field
A field is equivalent to a column in the relational database model. Fields originate in the structure of the data
source, but you may define calculated fields in a Domain or custom fields in the Ad Hoc Editor. Any type of
field, along with its display name and default formatting properties, is called an item and may be used in the Ad
Hoc Editor.
Frame
In Jaspersoft Studio, a frame is a rectangular element that can contain other elements and optionally draw a
border around them. Elements inside a frame are positioned relative to the frame, not to the band, and when you
move a frame, all the elements contained in the frame move together. A frame automatically stretches to fit its
contents.
Frame can also refer to an element in a legacy dashboard; it's the equivalent of a dashlet.
Group
In a report, a group is a set of data rows that have an identical value in a designated field.
In a table, the value appears in a header and footer around the rows of the group, while the other fields
appear as columns.
In a chart, the field chosen to define the group becomes the independent variable on the X axis, while the
other fields of each group are used to compute the dependent value on the Y axis.
Hierarchy Level
In an OLAP cube, a member of a dimension containing a group of members.
Input Control
A button, check box, drop-down list, text field, or calendar icon that allows users to enter a value when running
a report or viewing a dashboard that accepts input parameters. For JRXML reports, input controls and their
associated datatypes must be defined as repository objects and explicitly associated with the report. For
Domain-based reports that prompt for filter values, the input controls are defined internally. When either type of
report is used in a dashboard, its input controls are available to be added as special content.
Item
When designing a Domain or creating a Topic based on a Domain, an item is the representation of a database
field or a calculated field along with its display name and formatting properties defined in the Domain. Items
can be grouped in sets and are available for use in the creation of Ad Hoc reports.
JasperReport
A combination of a report template and data that produces a complex document for viewing, printing, or
archiving information. In the server, a JasperReport references other resources in the repository:
The report template (in the form of a JRXML file)
Information about the data source that supplies data for the report
Any additional resources, such as images, fonts, and resource bundles referenced by the report template.
The collection of all the resources that are referenced in a JasperReport is sometimes called a report unit. End
users usually see and interact with a JasperReport as a single resource in the repository, but report creators must
define all of the components in the report unit.
Jaspersoft Studio
A commercial open source tool for graphically designing reports that leverage all features of the JasperReports
Library. Jaspersoft Studio lets you drag and drop fields, charts, and sub-reports onto a canvas, and also define
parameters or expressions for each object to create pixel-perfect reports. You can generate the JRXML of the
report directly in Jaspersoft Studio, or upload it to JasperReports Server. Jaspersoft Studio is implemented in
Eclipse.
JasperReports Library
An embeddable, open source, Java API for generating a report, filling it with current data, drawing charts and
tables, and exporting to any standard format (HTML, PDF, Excel, CSV, and others). JasperReports processes
reports defined in JRXML, an open XML format that allows the report to contain expressions and logic to
control report output based on run-time data.
JasperReports Server
A commercial open source, server-based application that calls the JasperReports Library to generate and share
reports securely. JasperReports Server authenticates users and lets them upload, run, view, schedule, and send
reports from a web browser. Commercial versions provide metadata layers, interactive report and dashboard
creation, and enterprise features such as organizations and auditing.
Jaspersoft ETL
A graphical tool for designing and implementing your data extraction, transforming, and loading (ETL) tasks. It
provides hundreds of data source connectors to extract data from many relational and non-relational systems.
Then, it schedules and performs data aggregation and integration into data marts or data warehouses that you
use for reporting.
Jaspersoft OLAP
A relational OLAP server integrated into JasperReports Server that performs data analysis with MDX queries.
The product includes query builders and visualization clients that help users explore and make sense of
multidimensional data. Jaspersoft OLAP also supports XML/A connections to remote servers.
Jaspersoft Studio
An open source tool for graphically designing reports that leverage all features of the JasperReports Library.
Jaspersoft Studio lets you drag and drop fields, charts, and sub-reports onto a canvas, and also define parameters
or expressions for each object to create pixel-perfect reports. You can generate the JRXML of the report directly
in Jaspersoft Studio, or upload it to JasperReports Server. Jaspersoft Studio is implemented in Eclipse.
JavaBean
A reusable Java component that can be dropped into an application container to provide standard functionality.
JDBC
Java Database Connectivity. A standard interface that Java applications use to access databases.
JNDI
Java Naming and Directory Interface. A standard interface that Java applications use to access naming and
directory services.
Join Tree
In Domains, a collection of joined tables from the actual data source. A join is the relational operation that
associates the rows of one table with the rows of another table based on a common value in given field of each
table. Only the fields in a same join tree or calculated from the fields in a same join tree may appear together in
a report.
JPivot
An open source graphical user interface for OLAP operations. For more information, visit
http://jpivot.sourceforge.net/.
JRXML
An XML file format for saving and sharing reports created for the JasperReports Library and the applications
that use it, such as Jaspersoft Studio and JasperReports Server. JRXML is an open format that uses the XML
standard to define precisely all the structure and configuration of a report.
Level
Specifies the scope of an aggregate function in an Ad Hoc view. Level values include Current (not available for
PercentOf), ColumnGroup, ColumnTotal, RowGroup, RowTotal, Total.
MDX
Multidimensional Expression Language. A language for querying multidimensional objects, such as OLAP (On
Line Analytical Processing) cubes, and returning cube data for analytical processing. An MDX query is the
query that determines the data displayed in an OLAP view.
Measure
Depending on the context:
In a report, a formula that calculates the values displayed in a table's columns, a crosstab's data values, or a
chart's dependent variable (such as the slices in a pie).
In an OLAP view, a formula that calculates the facts that constitute the quantitative data in a cube.
Mondrian
A Java-based, open source multidimensional database application.
Mondrian Connection
An OLAP client connection that consists of an OLAP schema and a data source. OLAP client connections
populate OLAP views.
Mondrian Schema Editor
An open source Eclipse plug-in for creating Mondrian OLAP schemas.
Parameter
Named values that are passed to the engine at report-filling time to control the data returned or the appearance
and formatting of the report. A report parameter is defined by its name and type. In JasperReports Server,
parameters can be mapped to input controls that users can interact with.
Pivot
To rotate a crosstab such that its row groups become column groups and its column groups become rows. In the
Role
A security feature of JasperReports Server. Administrators create named roles, assign them to user accounts, and
then set access permissions to repository objects based on those roles. Certain roles also determine what
functionality and menu options are displayed to users in the JasperReports Server interface.
Schema
A logical model that determines how data is stored. For example, the schema in a relational database is a
description of the relationships between tables, views, and indexes. In Jaspersoft OLAP, an OLAP schema is the
logical model of the data that appears in an OLAP view; they are uploaded to the repository as resources. For
Domains, schemas are represented in XML design files.
Schema Workbench
A graphical tool for easily designing OLAP schemas, data security schemas, and MDX queries. The resulting
cube and query definitions can then be used in Jaspersoft OLAP to perform simple but powerful analysis of
large quantities of multi-dimensional data stored in standard RDBMS systems.
Set
In Domains and Domain Topics, a named collection of items grouped together for ease of use in the Ad Hoc
Editor. A set can be based on the fields in a table or entirely defined by the Domain creator, but all items in a
set must originate in the same join tree. The order of items in a set is preserved.
Slice
An OLAP operation for filtering data rows.
SQL
Structured Query Language. A standard language used to access and manipulate data and schemas in a
relational database.
System Admin
Also called the system administrator. A user who has unlimited access to manage all organizations, users, roles,
repository permissions, and repository objects across the entire JasperReports Server instance. The system admin
can create root-level organizations and manage all server settings. The default system admin is the superuser
account.
Topic
A JRXML file created externally and uploaded to JasperReports Server as a basis for Ad Hoc reports. Topics are
created by business analysts to specify a data source and a list of fields with which business users can create
reports in the Ad Hoc Editor. Topics are stored in the Ad Hoc Components folder of the repository and
displayed when a user launches the Ad Hoc Editor.
Transactional Data
Data that describe measurable aspects of an event, such as a retail transaction, relevant to your business.
Transactional data are often stored in relational databases, with one row for each event and a table column or
field for each measure.
User
Depending on the context:
A person who interacts with JasperReports Server through the web interface. There are generally three
categories of users: administrators who install and configure JasperReports Server, database experts or
business analysts who create data sources and Domains, and business users who create and view reports and
dashboards.
A user account that has an ID and password to enforce authentication. Both people and API calls accessing
the server must provide the ID and password of a valid user account. Roles are assigned to user accounts to
determine access to objects in the repository.
View
Several meanings pertain to JasperReports Server:
An Ad Hoc view. See Ad Hoc View.
An OLAP view. See OLAP View.
A database view. See http://en.wikipedia.org/wiki/View_%28database%29.
Virtual Data Source
A virtual data source allows you to combine data residing in multiple JDBC and/or JNDI data sources into a
single data source that can query the combined data. Once you have created a virtual data source, you create
Domains that join tables across the data sources to define the relationships between the data sources.
WCF
Web Component Framework. A low-level GUI component of JPivot. For more information, see
http://jpivot.sourceforge.net/wcf/index.html.
Web Services
A SOAP (Simple Object Access Protocol) API that enables applications to access certain features of
JasperReports Server. The features include repository, scheduling and user administration tasks.
XML
eXtensible Markup language. A standard for defining, transferring, and interpreting data for use across any
number of XML-enabled applications.
XML/A
XML for Analysis. An XML standard that uses Simple Object Access protocol (SOAP) to access remote data
sources. For more information, see http://www.xmla.org/.
XML/A Connection
A type of OLAP client connection that consists of Simple Object Access Protocol (SOAP) definitions used to
access data on a remote server. OLAP client connections populate OLAP views.
& fonts 92
heartbeat 150
&theme parameter 107
HTML exporter 137
A HTML5 for Pro Charts 138
input controls 77
About JasperReports Server window 15
JAR files 93
access control
JasperReports Library 134
administering 41
JDBC data sources 50
object-level permissions 44
JNDI data sources 55
permissions 41
lists 76
repository 11
localization 176, 181, 184
accessibility 101
logging in as a user 46
adding
object-level permissions 44
bean data sources 71-72
online help 151
datatypes 76
queries 73
folders 37
report intervals 147
JDBC data sources 50
repository 10, 31
JNDI data sources 55
resource bundles 93
lists 77
resources 37
queries 73
roles 12, 21
resources 37
thumbnails 150
administering JasperReports Server
users 12, 17
Amazon Web Services 132
XHTML exporter 137
Azure SQL Server 132
Adobe Flash 138
bean data sources 71
Amazon Web Services
chart themes 136
configuring services 132
configuration files 123
creating a data source 56
crosstab limit 135
Apple iOS 138
data sources 47
Asian fonts 173-174
datatypes 75
attributes 24
folders 37
attributes, user 85
overview 173 Q
UTF-8 176
queries
log file 153
administering 73
logging
creating 73
log file location 153
multiple query languages 75
system events 153
parameters for cascading input controls 86
logging in as a user 46
parameters for query-based input controls 86
login page
query executors 75
theme 102
using 73
M query-based input controls 80
maxHttpHeaderSize 161 R
MongoDB data sources 47
repo syntax 34
moving
reports
folders 39
JasperReport 33
resources 11, 39
report intervals 147
multibyte fonts 173
scheduling 147
MySQL 178
troubleshooting fonts in exported reports 92
O repository
access control 11
OLAP views 175, 180
administering 10, 31
online help 151
browsing 11
Oracle
folders 10
character sets 179
importing and exporting 109
Out of Memory errors 135
reference syntax 34
overrides_custom.css file 100
resources 11, 33
P sample data 11
parameterized queries. See queries. 77 searching 11, 22
PDF structure 10
embedding fonts 176 UTF-8 encoding 177-178
troubleshooting fonts in 92 resource bundles 92
permissions. See access control. 41, 44 resources
PhantomJS 139 adding 37
portlets browsing 11
and JBoss 123 copying 11
and Liferay 123 cutting 11
PostgreSQL 177 deleting 11, 41
prerequisites for Jaspersoft OLAP 9 editing 38
Pro Charts 138 fonts 92
profile attributes Seeattributes importing and exporting 109
properties files in repository 33
creating 181 JAR files 93
resource bundles 183 moving 39
pasting 11
queries 73
resource bundles 93 U
resource references in JRXML files. See
repository. 34 Unicode Transformation Format (UTF-8). See character
encoding. 176
searching 11
user attributes 24
Rhino 139
and query-based input controls 85
roles
user interface samples 107
administering 12, 21
users
and users 21
administering 12, 17
default roles 21
authenticating 41
object-level permissions 44
default users 17
searching for 22
logging in as 46
S object-level permissions 44
roles 21
saving input controls 76-77, 80
searching for 18
searching the repository 11, 22
snapshotPersistenceEnabled 130 V
snapshotRecordingEnabled 130
version of the software 15
SSH private key 95
support, finding product version 15 X
system admin roles 21
XHTML exporter 137
system logging 153
XML file data source 69
T
themes See alsochart themes
&theme parameter 107
active theme 98
and accessibility 101
CSS files 99, 105
custom overrides 101
default theme 98
downloading 104
Easy Access theme 101
Firefox web tools 106
inheritance mechanism 100
login page 102
recovering from inadvertent changes 107
sample galleries 108
Themes folder 98
uploading 105
URL parameter 107
ZIP archive 103
third-party APIs 93
thumbnails 150
time zones 185
Tomcat 177
translations 173