Creating the OLAP Report With a Procedural Hierarchy

How to:

Now you will create a report with the Report Painter and use the TRADES data source. You will use the dimensions you created earlier with the Dimensions Tool. After you OLAP-enable and run your report, you will drill down on dimensions and measures, drag and drop them, and use the new right-click menu on the enhanced OLAP user interface.


Top of page

x
Procedure: How to Create the OLAP Report With a Procedural Hierarchy
  1. If it is not already open, open the Procedure Viewer for the TRADESREP procedure.
  2. In the Procedure Viewer, click the diamond to the right of the Join component and select Report from the component connector toolbar.

    Join component

    The Open dialog box asks you to specify the data source you will be using to create your report.

  3. Select TRADES.MAS.

    select a master file

  4. Click Open. The Report Painter opens, where you will create a report using fields from the TRADES data source.

Top of page

x
Procedure: How to Add Fields From the TRADES Data Source to the Report

To create a report, you must add fields to it. Follow these steps to add fields to your report in the Report Painter.

The Object Inspector window, located at the left side of the Report Painter, lists the fields in the TRADES Master File.

  1. Double-click the following fields in the Fields tab on the Object Inspector to add them to the report:
    • CONTINENT
    • QTR
    • TRADER_ID
    • TYPE
    • AMOUNT
  2. Select the Continent column and press the Shift key and click the QTR column to select them simultaneously.
  3. Click the By By button button on the main toolbar to sort the data for the Continent and QTR columns vertically.
  4. Click the Broker_ID column.
  5. Click the Sum Sum button button.
  6. Place the cursor in the Page Heading area.
  7. In the Page Heading area, type Instrument Report for Each Continent.

    Tip: If your report boundaries are not showing (the Page Heading and Page Footing areas), click the Report menu and select View. Click the check box for Boundaries in the General section and then click OK.

  8. Press the Enter key to add a blank line to the heading.
  9. Highlight the first line of heading text and select Fonts from the Properties menu.

    The following font attributes are the default:

    • Font: Arial
    • Font Style: Bold
    • Size: 10
  10. Click the Color button and select blue.
  11. Click OK to close the Font dialog box.
  12. Click the Center Justify Center Justify button button on the toolbar.

    Your report should now look like the following image.

    Report Painter


Top of page

x
Procedure: How to Run the TRADESREP Report

OLAP options are available on the Report Painters Report Options Features tab. The relevant options are Enable OLAP and Automatic Drill Down.

You can also enable OLAP from the OLAP option on the Report menu. For details, see the Creating Reporting Applications With Developer Studio manual.

Complete the following steps to OLAP-enable your report.

  1. From the Report menu, select Features. The Report Options dialog box opens at the Features tab.
  2. In the OLAP area, select Top Panel from the Enable OLAP drop-down list. When you later run your report, the OLAP selections panel will appear above your report output.

  3. Select Dimensions and Measures from the Automatic Drill Down list. When you later run your report, this will enable automatic drill downs on dimensions and measures.

    Report Options

  4. Click OK to close the Report Options dialog box.
  5. Click the Run button.

    WebFOCUS OLAP

Notice that the OLAP selections panel appears above the report output, as you requested in step 2. Use this panel to manipulate your output. Also, notice that drill down hyperlinks are active for the dimensions and measures.


Top of page

x
Procedure: How to Manipulate Output With the Dimension Controls

In an OLAP-enabled report, every dimension in the hierarchy has a control (drop-down list) next to it. You can create selection criteria using the dimension controls. You can also drag dimensions from the selections panel (above the blue colored band) to the body of the report.

  1. In the OLAP selections panel, click the Continent down arrow and double-click AMERICAS.
  2. Click the Run button.

    WebFOCUS OLAP

  3. Now click the Month dimension control (the L-shaped line to the left of MONTH) and drag it to the right of the QTR column in the body of the report.

    Note: You may also use the OLAP Control Panel window to select Month and add it as a Drill Down field. Click Run from the OLAP Control Panel.

    WebFOCUS OLAP

    Right-click the QTR dimension in the report and select Move to Across from the menu.

    WebFOCUS OLAP

    The QTR column changes from a BY field to an ACROSS field.

    WebFOCUS OLAP

    Now you have experimented with data manipulation in a report created with a procedural hierarchy.

    You can continue to the next exercise, where you will use another data source and explore other ways of manipulating data in an OLAP-enabled report.


WebFOCUS