You can add, change, and delete domain components.
|
|
To edit a Domain:
1. | Log into the server as an administrator and select View > Search Results. |
2. | Locate the Domain. |
a. | In the Filters panel, under All Types, click More choices. |
b. | Click Domains. |
3. | Right-click a Domain and select Edit from the context menu. The Edit Domain page is similar to the Add New Domain page documented in Using the Add New Domain Page. |
|
Edit Domain Page |
4. | Change the Domain's Name and Description. |
5. | Browse to locate a new Data Source. Because the Domain design relies extensively on the data source, changing the data source makes sense only in certain cases. Examples include: |
• | Switching to a data source with a different schema but with the same tables, for example, when moving from staging to production. |
• | Switching from a regular data source to a virtual data source that contains the original data source. In this case, JasperReports Server attempts to locate the original data source inside the virtual data source and create the correct prefix. Derived tables and calculated fields are not preserved. |
• | Switching from a virtual data source to one of the underlying data sources. In this case, any resources that are not in the selected data source are deleted along with any dependent information, such as derived tables, joins, calculated fields, or labels that depend on the deleted resources. |
If you change to a data source with a different database, the definitions in the Domain design become invalid and you can't save the Domain.
|
Before you switch the data source for a Domain, back up the Domain and export a Domain design file. See Switching the Data Source of a Domain for more information. |
6. | Click Edit with Domain Designer. For instructions, see section Using the Domain Designer. Alternatively, select the Upload option, and browse to locate a Domain design file. You can import the XML file of the Domain design after exporting it and making modifications in an external editor. See “Maintaining Referential Integrity” below if you need to remove items in the Domain. |
7. | To add or replace the security file or locale bundles for the Domain, click Add Security File or Add Locale Bundle in Optional Information. The Resources page is further documented in section The Domain Design File. |
8. | Click Submit to update the Domain. To close the Domain Designer without modifying the Domain stored in the repository, click Cancel. |
After modifying a Domain, you must clear the Ad Hoc cache of all queries based on the Domain. This removes any data that was based on the old instance of the Domain and avoids inconsistencies in new reports. For instructions, see the JasperReports Server Administrator Guide.