Adding data attributes to template elements

You can specify which data attributes to display in a template element.

Procedure

  1. In Document Studio, open the Data Source Schema view.
  2. Drag the elements from the Data Source Schema view into a template element.

Results

When you apply an attribute to an element, the name of the attribute displays in the template content editor:

Cell element with a query applied

If you generate your output and the data attribute displays as <data attribute not found>, it means that the attribute used in the template is not found in the data. When that happens, the most common reason is using a schema on a different data source than the one for which the report was designed.

Some data sources permit the creation of custom attributes that you can use in the report design. If the report uses a custom attribute that is specific to a repository or project, the report runs as designed (extracting all of the data) only with a data source that has the custom attribute defined. Running on data sources that do not have the custom attributes results in undefined behavior (incomplete results, incorrect results etc).

To resolve the issue, you can modify your data selection to include data that uses that attribute, or you can remove the data attribute from your template. To change the text that displays from <data attribute not found>, you can customize it by changing the missing data text property value in your document specification. For more information on the missing data text property and other metadata properties, see Runtime metadata properties reference.

What to do next

Tip: You can search for a list of queries and attributes by right-clicking an element and selecting Search > Data references in element. The Search view opens and a list of queries and attributes displays. You can double-click a query or attribute in the results to edit its content.

You can search for a list of variable assignments, attributes, and queries used in an element by right-clicking an element and selecting Search > All references in element. The Search view opens and a list displays. You can double-click an item in the results to edit it.

You can locate a query or attribute in the Data Source Schemas view from the element it is applied to by right-clicking an element and selecting Search > Go to schema. The Data Source Schema view opens and the query or attribute is highlighted.


Feedback