Configuring a document for generation can be a complex task. And a large number of data sources, some of them apparently not related to the purpose of the report, can further enhance the difficulty.
RPE 1.2 comes with mechanisms that allow the template designer to simplify the process of configuring the template at runtime.
When designing templates it is often necessary to use multiple data sources. But not all the data sources need to be configured by the person that will use your template to generate documents. For some data sources only the URI is required, others require only credentials and some data sources, usually dynamically configured ones, should not be visible at all to the end user.
With RPE 1.2 the template designed can fine tune the configuration information that has to be provided for each data source through the “configuration required” property. This property is similar to the “Access value” property of variables.
There are 4 possible values that can be used with this property:
- none – no configuration is required for the data source. The data source is visible in the document specification and is marked as fully configured.
- URI – default value. Only the URI of the data source needs to be provided. The data source is visible in the document specification.
- credentials – only the credential for accessing the data source needs to be provided. The data source is visible in the document specification. This is typically used with Dynamic Data Sources for which the URL of the data is calculated inside the template.
NOTE: if the credentials for another visible data source in the template can be used with this data source than we recommend inheriting the credentials from it using the “inherited data source” property in the Dynamic Data Source element and setting the configuration required to hidden
- full – both the URI and the credentials are required. The data source is visible in the document specification.
- hidden – no configuration is required for the data source and the data source is visible in the document specification. This is typically used for Dynamic Data Sources.
Another data source property added in 1.2 that, if used, can greatly simplify the process of configuring a document specification is “default URI”. If this property is not empty in the template, RPE will default to it at runtime and will consider the URI property as being filled. If the user provides a new value that value will be used.
This is applicable for those data sources for which the entry URI is always the same regardless of the user or project for which data is being requested. For example the URL for RTC workitems always looks like http(s)://server:port/<context>/rpt/repository/workitem so by providing the valid URL for your team’s RTC server you remove the need for each user in your team to type it when configuring their reports.
The Central Library can further simplify this process by replacing the usage of raw URLs with human readable labels. That aspect will be detailed in a future post.