Combination Rules

PS/nVision tries to retrieve the data for each report instance with as few Select statements as possible. It examines all row and column criteria to determine which can be combined. It then builds a Select statement to retrieve each intersection of a combined group of rows with a combined group of columns. The following built-in rules should be understood when you design indexes:

  • Different ledgers cannot be combined.

  • Different TimeSpans cannot be combined.

  • nPloded rows or columns cannot be combined with non-nPloded rows or columns.

  • To be combined, multiple rows or columns must have criteria for the same set of fields, and each field’s criteria must be of the same type. (For example, selected tree nodes cannot be combined with selected detail values).

  • If criteria for a field are specified by tree node, they can be combined only if they use the same tree.

  • If the combined rows or columns have identical criteria for a particular field, the criteria are included in the Where clause, but a Group By clause on that field is not required. But if different rows or columns in the group have different criteria, PS/nVision adds this field (or the corresponding tree node number) to the Group By clause to retrieve a value for use in posting the answer set to the appropriate rows or columns of the report.

  • A single Select statement can retrieve amounts for multiple combined rows and columns.

  • Different scope instances are retrieved with separate Select statements.

Some additional rules apply for layouts defined using queries rather than ledgers:

  • Different queries are not combined.

  • References to different answer columns in the same query can be retrieved with a single Select statement if they meet the above tests.