You can edit a Domain by changing, adding to, and deleting its components.

|
Use extreme caution when editing Domains that might have been used for reports and Domain Topics. A Domain specifies the data source for the Domain Topics and reports that are based on the Domain. These Domain Topics and reports might fail if you edit the underlying Domain; if you delete the underlying Domain, dependent reports fail.
Before you edit a Domain, see Maintaining Referential Integrity.
|
To edit a Domain:
|
1.
|
Log in to the server as an administrator and select View > Search Results. |
|
a.
|
Choose View > Search Results. |
|
b.
|
In the Filters panel, under Types, click More choices. |
|
3.
|
Right-click an existing Domain and select Edit from the context menu. |
The Edit Domain page appears. This page is similar to the Add New Domain page documented in Using the Add New Domain Page.
|
4.
|
In the Name field, change the display name of the Domain. |
|
5.
|
In the Description field, change the description of the Domain. |
|
6.
|
In the Data Source field, browse to locate a new data source for the Domain. Because the Domain design relies extensively on the data source, changing the data source only makes sense 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 are no longer valid and you are not able to save the Domain.
|
7.
|
Under Domain Design, 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 also “Maintaining Referential Integrity” below if you need to remove items in the Domain. |
|
8.
|
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. |
|
9.
|
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.