When defining a Domain and its security, keep these recommendations in mind:
| • | A Domain should cover a large subject area and include data with multiple uses. Define joins to create data islands that each contain related information; the data islands themselves can contain completely unrelated data. For example, you could include both human resources and sales data in a single Domain; different users would see only the information relevant to their job responsibilities. For an example of this type of Domain, refer to the SuperMart example that can be installed with JasperReports Server. |
| • | When defining a Domain, don’t create too many item groups, and avoid very deep structures with many levels. Such complexity makes the Domain harder to use. |
| • | Logging can help you troubleshoot any problems you encounter while implementing Domain security. For more information, refer to Enabling Logging. |
| • | Refer to http://groovy.codehaus.org for information on the Groovy expressions that Domain security files support. Note that, while the server does validates Groovy expressions, the validation is very light weight: it doesn’t detect all improperly formed expressions. |
| • | If the names of tables and fields in your data source change, you can edit the Domain design XML file so that the resource names match the new names in the database. Then, upload the new version of the file; your reports that rely on the Domain will work properly without being updated individually. If you have defined a security file for this Domain, you must also edit the resource names in the security file, as well. |
| • | Start with the simplest item or resource grant, and when that works, expand upon it. Start simple and iterate until you have the full set of access grants needed. Follow good troubleshooting practices, such as only changing a single aspect of the security file before testing the results of the change. |
| • | Use an XML editor to create your security file. While the server validates the schema against its own XML definition, a typical XML editor can identify such issues as tags that aren’t properly closed. For example, open the security file with Internet Explorer; if it returns errors, use them to identify and correct your XML. |
| • | Once your Domain is created, create several Domain Topics that focus on specific aspects of the Domain or specific data your end-users will want to review regularly. To do so, click Create > Ad Hoc Report, select your Domain, and use the Data, Filters, and Display pages to customize the contents and the way it is displayed, then use the Topics page to save the new Domain Topic. |
For tips on improving the performance of Domains and reports that rely on them, refer to Scalability.
Recommended Comments
There are no comments to display.