The metadata repository is a database that holds configurable resources required for business intelligence. The repository is organized into folders, and resources can appear anywhere in the folder hierarchy. Every resource has a name, label, description and type associated with it. Report UnitThe individual reports that people can run are reflected in JasperReports Server as "Report Units". A report unit contains all the required resources to produce a report, which are below: | [toc] |
- JRXML: the JasperReports definition file
- Data source: A database connection to populate the report.
- Additional resource types which can be used on an as needed basis include:
- Images
- Fonts
- Sub reports
- JAR files for JasperReports scriptlets
- Data types for report parameters
- Input controls: groupings of data types
- Resource bundles for localization/internationalization
A report unit can contain private resources only for use by the given report unit, or can refer to resources in the metadata repository that exist independently of a given report unit: eg. there may be a data source, image or font that is useful across report units. In planning your use of the repository for reporting, consider what resources would be useful across different report units. For example, you are likely to have a limited number of data sources with multiple reports using each data source, so set up the data sources once and then refer to them in the report units. There may be other resources like a common company logo image or departmental resources that a number of reports will refer to.
JRXML and the Metadata Repository
Usually, JasperReports relies on finding resources it needs either within its libraries (standard fonts) or on the classpath (images, sub reports). JasperReports Server changes the way that JasperReports runs by allowing resources to be pulled interactively from the metadata repository. For example, an image on the classpath can be referred to in JRXML as: "images/MyLogo.jpg". The JRXML to refer to an image from the metadata repository would be: "repo:images/MyLogo.jpg".
JasperReports Server will look for an image file named MyLogo.jpg in the images folder.
Input Controls and Data Types
JasperReports allows external parameters to be provided to customize the functionality of a JasperReport. JasperReports Server includes a variety of "Input Controls" that can be mapped to these parameters. When the report unit is run, the user is prompted to select or fill in the controls with values for the parameters. These values are validated as needed before they are passed on to the report.
Multiple Input Controls may be included in a single report unit. The types of Input Controls are:
- Boolean
- Single Value
- Single Select from a List of Values
- Single Select Query
- Multi Select from a List of Values
- Multi Select Query
- Single Select from a List of Values (radio button)
- Single Select Query (radio button)
- Multi Select List of Values (check box)
- Multi Select Query (check box)
Since the end-user is free to enter any value into a Single Select Input Control, validation is required. Each Single Select control is associated with a Data Type that defines the validation rules for that control. The Data Type is a resource in the metadata repository and thus has a name, label, and description. In addition, Data Types have the following attributes:
- Type: Text, Number, Date, Date/Time
- Pattern: formatting related to the underlying Java data type
- Minimum Value, Maximum Value: range of values, can be open-ended in one direction
- Is strict minimum, Is strict maximum: values have to be strictly less than or greater than, not equal to
- Mandatory: a value is required
- Read only: the value cannot be altered by the user
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.
File Resources
You create file resources by uploading files so they can be referenced by Jasper Reports. JasperReports Server supports the following file types:
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 |
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 |
JRXML | The definition of a report in JasperReports' XML-based report definition language. A JRXML file can be uploaded separately for use in multiple JasperReports. |
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 |
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 JSON data files |
MongoDB JDBC Schema | |
MongoDB Schema File | |
Azure Certificate | A x.509 server certificate (.cer) or key exchange (.pfx) file used to authenticate JasperReports Server with Microsoft Azure |
Secure File | A SSH private key file for SFTP file transfers that require a SSH key |
Secure Key File | |
Public Key File | |
Public Key File |
Security
The user names and encrypted passwords for the application that are used for the form-based authentication, are stored in the metadata repository.
JasperReports Server also implements roles for creating groups or classes of users with similar permissions. A user can belong to any number of roles and have the privileges of each The server stores role definition in the metadata database, and administrators create, modify, and delete roles through the administrator pages, as described in the TIBCO JasperReports Server Administrator Guide.
JasperReports Server relies on the open source Spring security framework; it has many configurable options for:
• External authentication services such as LDAP (used by Microsoft Active Directory and Novell eDirectory)
• Single sign-on using JA-SIG's Central Authentication Service (CAS)
• Java Authentication and Authorization Service (JAAS)
• Container security (Tomcat, Jetty)
• SiteMinder
• Anonymous user access (disabled by default)
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now