How to use declarative indexes in reports
Summary
Data from indexed embedded properties can be included in reports using the Join feature. This article shows you how to include indexed embedded properties in your reports using the Declarative Index Join feature in list view and summary view rules. For more information about creating declarative indexes, see How to create declarative indexes for embedded properties.
To include indexed embedded properties in a report, associate a prefix with an index definition. Each property in the index definition is then accessible in the other tabs by using the syntax: prefix.indexed property.
Note: Database columns discussed in this article must be exposed to be included in the report. Use the Modify Database Schema Wizard to check for exposed columns. Choose Tools > Database > Modify Database Schema
You can also use declarative indexes in V6 report definition rules. See How to use declarative indexes in report definition rules.
Suggested Approach
- Create or edit a new list or summary view rule.
- Open the Join tab.
- In the Declarative Index Join section, enter a text string to be used as an alias in the Prefix field.
- In the Index Name field, choose the index definition from the SmartPrompt list. Note that the indexed properties are listed in the SysAdmin category under Declare Index.
- Open the Contenttab and, in the Get These Fields section, enter properties, as usual, then properties from the index definition using the syntax, prefix.indexed property.
- In the Report Source section, enter a text string in the Content Page Name field.
- Enable Read Only.
- For list views, open the Display Fields tab and enter the properties, using the same syntax, and labels that you want to display in the report. For summary views, enter the appropriate information in the DrillDowntab.
- Open the Organize tab and disable Customize View Button and the Edit? box next to the Excel Button field.
- Click the Save toolbar button.
- Click the Run toolbar button. The view contains data drawn from the indexed table.
Related Topics
Twenty-seven commonly used JOIN conditions for list view and summary view reports