Incorporating Standard Reporting Functions Into a Report

How to:

The following standard reporting functions are available within the Data Sources palette of the Power Painter tool:


Top of page

x
Procedure: How to Create a DEFINE Statement
  1. Click the Define Define button button from the Data Sources palette.

    The Field creator dialog box opens.

  2. Type the name of the virtual field in the Field input box.
  3. Enter an expression in the expressions box.
  4. Click OK to close the Define field creator dialog box.

    The DEFINE field is added to the report field list.

  5. Drag and drop the DEFINE field into the report.

Top of page

x
Procedure: How to Create a COMPUTE Statement
  1. Click the Compute Compute button button from the Query palette.

    The Field creator dialog box opens.

  2. Type the name of the COMPUTE field in the Field input box.
  3. Enter an expression in the expressions box.
  4. Click OK to close the Compute field creator dialog box and apply the COMPUTE statement.

    The COMPUTE field is added to the report.


Top of page

x
Procedure: How to Create a JOIN Between Data Sources
  1. Click the Joins tab in the Data Sources palette.

    Data Sources Joins tab

  2. Click the Add Join button from the Data Sources palette toolbar.
  3. Select a target Master File and click OK.

    The Create Join dialog box opens.

    Create Join

    Note: Joins can also be created on defined fields. For more information about defined fields, see How to Create a DEFINE Statement.

  4. Type a name for the Join in the Description field.
  5. Select the Type and Instances for the Join or use the default selections.
  6. Click the Select a source field browse (...) button to select the Join source field.
  7. Click the Select a target field browse (...) button to select the target fields.

    Note: If no target fields are available, you are notified that there are no fields found.

  8. Click Save & Create to save the Join relationship.

    The joined field is added to the Joins tab.

    Data Sources

  9. Click the Fields tab in the Data Source palette to view the joined data.

    Data Sources

  10. Drag and drop joined fields onto the canvas as you would any other field.

Note: To edit a join, double-click the join.


Top of page

x
Procedure: How to Create Conditional Styling Rules
  1. Open the Query pop-up dialog box or Query palette in the canvas.
    • To open the Query pop-up dialog box, click the Query button above the selected object (or right-click the object and select Query from the context menu).
    • To open the Query palette, from the View menu, select Palettes, then select Query from the Palettes submenu.
  2. Select the field name in the Query pop-up dialog box or Query palette.

    When fields are selected, properties for each field are available in the Field properties palette.

  3. Click the Field properties palette and scroll down until you see Conditional styling.
  4. Click in the Conditional styling value field and select the New styling rule button.

    Query

    The Create Conditional Style Rule dialog box opens, as shown in the following image.

    Create Conditional Style Rule

  5. Create the style conditions for the field.
    1. Type a name for the condition or accept the default.
    2. Select a relationship for the condition from the Relationship drop-down list.
    3. Specify a value by doing one of the following:
      • Type a literal value in the Value input field.

        or

      • Click Values from the Compare type section to display existing data source values.
    4. Click Done to save and apply the conditional style rule.

      The condition is added to the Field properties palette and the condition is applied to the data on the Power Painter canvas.

The following image is an example of the Field properties palette with a Low Balance condition rule. The report object shows red text where the conditional styling rule was applied.

Low Balance condition rule


Top of page

x
Procedure: How to Create a WHERE Statement
  1. Select a report or graph object in the Power Painter canvas.
  2. From the View menu, select Selection Criteria from the Palettes submenu.

    The Selection Criteria palette appears on the bottom of the canvas.

  3. Drag a field name from the Data Sources palette to the Selection Criteria palette.

    The WHERE statement is added to the Selection Criteria palette.

    Selection Criteria

  4. Specify the condition by using the drop-down list.

  5. Click Select Value to open the Select Value dialog box.

    Select Value

  6. Select a Constant, Parameter, Field or Value selection button.
    • If creating a constant, manually type in a value for the WHERE statement.
    • If creating a parameter, click the browse (...) button to open the Variable Editor dialog box. For details, see How to Create Parameters and Run in the Auto Prompting Facility.

      Select the name, selection, and value options for the WHERE statement.

    • If creating a Field or Value, select a value from the list supplied.

    Value selection button

  7. Click OK to close the Select Value dialog box.

    The value is added to the Selection Criteria palette and the report or graph reflects the WHERE statement as soon as the value is selected.

    value selection

    Note: To delete the WHERE statement, select the WHERE statement check box and click the red X on the blue highlighted line in the Selection Criteria palette. If you click Save or Quit while a parameter is selected, a prompt appears. The prompt allows you to save the parameter. The parameter is deleted if you do not save it.


WebFOCUS