Defining Report Scopes

This chapter provides an overview of report scopes, and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Report Scopes

A report scope allows you to create multiple instances of a report using a single report layout and report request. Using a scope, each report instance contains data specific to an individual field value, such as a business unit or department, or to a group of values, such as a tree node that summarizes all sales departments. In this way, each report instance can share the same layout, while containing data unique to these field values. You might run three instances of an expense report that share the same layout but contain the expenses of one division each.

When defining a report request, you can use the scope feature to create multiple instances of a report from a single request.

You can specify more than one field in the scope to create instances that represent combinations of values of multiple fields. For example, you can use a multifield scope to create an instance for each product line (a grouping of products) within each region (a grouping of departments).

Whenever you use scope to produce multiple instances of a report, use PS/nVision variables in the layout headings to identify the content of each report.

See Also

Adding Variable Criteria

Click to jump to top of pageClick to jump to parent topicMultiple Scope Fields

When you define a new scope, you must determine how many instances to produce and how each instance is summarized.

If your scope is based on two or more fields (such as business unit and product), PS/nVision normally produces a report instance for each combination of the selected nodes or detail values for all specified fields. However, you might have data for only a subset of these combinations—for example, if each business unit sells only a subset of the total list of products. You could limit the number of report instances produced by defining multiple scopes, specifying only the valid combinations, and using different report requests to apply these scopes to appropriate layouts. But if you are working with many combinations, a better solution is to create a field combination table containing only the field value combinations you want for your scope. If you specify a field combination table, PS/nVision generates an instance of the report for only those field values that are listed as valid combinations on the table.

You create a field combination table in Application Designer just as you would create any other custom table. After creating the table with the combinations of fields to use, you point to that table from the Field Combination Table field in the Scope Definition dialog box.

You can also create a dynamic record that is populated by a query and includes only the combinations of field values that actually have data for that reporting period. This eliminates printing blank pages (report instances) when you have fields that have no data for a particular reporting period.

Note. When you create a combination table, you need only include the scope fields whose values you want to limit, but you can also include SETID and EFFDT. You can populate the table using a SQL tool as well, but a better option might be to create a simple page to update the table.

If you specify field values using tree nodes, PS/nVision uses the combination table to determine whether the underlying details are valid before producing an instance for a tree node. For example, if an instance is requested for each product and division (a rollup of departments on an organization tree), PS/nVision determines whether any departments in each division are valid in combination with a particular product. In this case, the combination table should contain a DEPTID and PRODUCT field, with each row containing the valid department/product combinations.

Using Business Unit Keyed Trees

You can define report scopes using business unit keyed trees by adding a valid business unit to the scope definition. You must still enter a setId as the key field for the scope, and the business unit you enter is used for selecting business unit keyed trees. At the field level, you must select the BU Keyed Tree check box to limit the tree selection list to those trees keyed by the business unit entered.

At run time, the requesting business unit is used as a replacement for the business unit that you entered when defining the scope. Therefore, if you define a tree with the same name for multiple business units, you can use the same scope for each version.

Click to jump to top of pageClick to jump to parent topicDefining Scopes

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicCreating New Scopes

Access the Scope Definition dialog box by selecting nVision, Scope Definition.

To define a new scope:

  1. Select New.

  2. Enter a scope name and a description.

    You may use up to ten characters for the scope name and up to thirty characters for the scope description.

  3. Enter the setID for this scope.

  4. If you are defining your scope using business unit keyed trees, enter the business unit.

  5. If you are using multiple scope fields, enter the appropriate tables in the Field Combination Table field.

  6. Add fields to the screen by clicking the Add button.

    The Scope Field dialog box appears.

Click to jump to top of pageClick to jump to parent topicSelecting Scope Fields

Access the Scope Field dialog box.

For each field you add to a scope, you specify the source of the field values and the values to use. This process is similar to defining field criteria in a matrix layout.

Each of the radio buttons on the Scope Field dialog box selects a different set of values for building your scope:

Field

Enter a field to add to your scope

Selected Tree Nodes

Select this option to create an instance for each tree node that you choose. When you type the field name, you are prompted to enter a tree name and level.

Children at a Level

Select this option to create an instance for each tree node at a specified tree level that is a child of the parent node. The parent nodes need not be the immediate parent of nodes at the specified level. When you type the field name, you are prompted to specify a tree name and level.

All Nodes at Selected Levels

Select this option to create an instance for every node at each selected level. When you type the field name, you are prompted to specify a tree name and level.

Selected Summary ChartField Nodes

Select this option to create an instance for every specified node in a tree used to create a summary ledger. (This option applies only to users of PeopleSoft General Ledger.) PeopleSoft recommends using summary trees rather than the summary ChartField nodes.

When detail values are summarized into tree nodes, you must use a different ChartField in the summary ledger data record to accommodate the maximum length of a node name (20 characters). When you type a field name, you are prompted to specify a tree name and level.

Detail of Selected Parents

Select this option to create an instance for each detail value associated with the specified tree nodes.

Selected Detail Values

Select this option to create an instance for each detail value that you specify. This option activates the Value Table field, where you can specify the table that contains the values that you want to select.

All Detail Values

Select this option to create an instance for all detail values. This option activates the Value Table field, where you can specify the table that contains the values that you want to use.

Effective Date

Enter a date to determine the trees you can choose from.

BU Keyed Tree

Select this check box to limit tree selection to trees keyed by the business unit entered on the Scope Definition screen.

Tree Name

Select the required tree for your scope. The list is filtered based on the setID or business unit, and field entered.

See Also

Working with Tree Concepts

Click to jump to top of pageClick to jump to parent topicChoosing Tree Levels and Tree Nodes

If you selected the All Nodes at Selected Levels, Selected Tree Nodes, Children at a Level, or Detail of Selected Parents options in the Scope Field dialog box, you are prompted to specify the tree levels that contain the nodes you want to use.

To select tree levels and nodes:

  1. Select a level.

  2. Place the cursor in the Tree Node field and click to get a list of nodes either by name or by position.

  3. Select the nodes to use for your report.

  4. Click OK.

    The Scope Definition dialog box now shows your fields and tree nodes.

  5. Save the scope by clicking Save.

Note. Make sure to click Save when you are finished with your scope. Clicking OK closes the dialog box without saving your scope.

Click to jump to top of pageClick to jump to parent topicWorking With Existing Scopes

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicOpening Existing Scopes

From within the Scope definition dialog box, click Open to access the Open Scope Definition dialog box.

To open an existing scope:

  1. From within the Scope Definition dialog box, click Open.

    The Open Scope Definition dialog box appears.

  2. Click Get List to see a list of available scope definitions.

    In the TableSet ID list box you see a list of setIDs; in the Scope Name - Description list box you see a list of scope definitions for each setID.

    You can limit the list by entering qualifiers into either the TablesSet ID or Scope Name fields before clicking Get List.

  3. Select a scope definition from the list.

  4. Click OK.

Click to jump to top of pageClick to jump to parent topicDeleting Existing Scopes

To delete an existing scope:

  1. Open the scope that you want to delete.

  2. Click the Delete button.

Click to jump to top of pageClick to jump to parent topicAdding Fields and Values to Existing Scopes

To add additional field values to a scope:

  1. Open the Scope Definition dialog box and click Add in the Fields selection area.

    The Scope Field dialog box appears.

  2. Enter the new scope fields and related values, and click Save.

  3. Click OK to return to the NVSUSER homepage.

See Also

Selecting Scope Fields

Click to jump to top of pageClick to jump to parent topicRemoving Fields and Values From Existing Scopes

To remove a field from a scope definition:

  1. In the Scope Definition dialog box, select the field to remove.

  2. Click the Delete button in the Fields group box.

To remove a field value from a scope definition:

  1. In the Scope Definition dialog box, select the Field whose value you want to remove.

  2. In the right-hand list box, select the value to remove.

  3. Click the Delete button in the right-hand group box.

Click to jump to top of pageClick to jump to parent topicUsing Scope-Related Variables

Using scope-related variables is discussed in the Creating Matrix Layouts chapter.

See Adding Variable Criteria.