Domains model and present data that report creators may not understand in raw form. Production databases typically contain data in tables optimized for storage and retrieval. A Domain is a virtual view, created and stored in JasperReports Server without modifying the data source, that models and presents the data in a way that is more accessible to report creators and readers. Columns with data relevant to users can be joined across several tables, filtered by business need, secured against unauthorized access, and labeled with user-friendly names. A Domain also supports the localization of static text and allows you to limit the data users can access permissions based on data values.
Who Uses Domains?
Domains help make data accessible to different types of users:
| • | Database administrators or business analysts create Domains, choosing and modeling the data to expose, and creating user-friendly labels where appropriate. These users have an understanding of the raw data as it appears in the data source. |
| In the default server installation, Domain creators must have organization-level admin privileges. See JasperReports Server Administrator Guide for more information. |
| • | Report designers use Domains to create Ad Hoc views in JasperReports Server or reports in Jaspersoft Studio. These users understand the data in the context of their specific business case, but might not understand the raw data in the original data source. |
| • | Report readers see only the data they need and understand. |
What Does a Domain Do?
A Domain has multiple levels that allow you to model and present data:
| • | Select schemas and tables from your data source on the Data Management tab, as well as create derived tables using SQL queries. See The Data Management Tab and Derived Tables for more information. |
| • | Define joins between any included tables and/or derived tables on the Joins tab. See The Joins Tab for more information. |
| • | Set conditions on field values to limit the data accessed through the Domain on the Pre-filters tab. See The Pre-filters Tab for more information. You can also filter data using calculated fields; see Calculated Fields for more information. |
| A Domain design often includes data filtering, but report creators can filter data even further or create input controls for report readers to use. |
| • | Choose which tables and columns to expose to users on the Data Presentation tab, and optionally define or change display properties. See The Data Presentation Tab for more information. |
| • | Upload files for security and localization on the Options tab. See The Options Tab for more information. |
Each Domain is stored in the repository as an XML design file along with the files the Domain references, such as a data source, locale bundles for localization, or a security file. You can create Domains in the Domain Designer, or you can upload a Domain design file in XML format. Localization bundles and security files must be created in text format and uploaded. See The Options TabLocalizing Domains, and The Domain Security File for more information.
Planning a Domain
Plan Domain features before you begin the creation process:
| • | Decide on the data source and define it in the server repository. |
| • | If you need to combine several data sources into a single data source, choose your data virtualization strategy. Either define each data source in the repository and then create a virtual data source that combines them, or use Jaspersoft Advanced Data Services and define a data source based on that. See Domains and Data Virtualization for more information. |
| • | If you want to use attributes, make sure they are defined and that you understand how they will work. This is especially important if you are using attributes for schema names. See Using Attributes in the Domain Designer for more information. |
| • | Know the elements of your design: tables and columns to choose, joins to perform, pre-filters to define, and items you want to present to users. |
| • | Determine whether the users of the Domain need localized resources, such as translated labels and local formats. |
| • | Determine a security policy for the data retrieved through the Domain. |
Open topic with navigation
Recommended Comments
There are no comments to display.