Creating a Report Page

A report page can be easily added to a sections or pages block in an existing divetab script. This example starts with the GUI and shows how to create a new separate script to define a report page.

  1. In Workbench, open your DiveTab project.
  2. Right-click on the /divetab/scripts folder and select ClosedNew > DiveTab Module.

    Creating a new DiveTab Module.

  3. Where highlighted in the Explorer pane, name the script data_report_page.divetab.
  4. Click the ClosedData Area button.

    Select the area type for the new divetab.

    The Closedbasic code displays.

    Basic code for a data area.

  5. Change the id value to something more meaningful, for example, sales.

    This id is used internally in the script.

  6. Within the data-area, add a title for the DiveTab users, for example, Report Page Sample.
  7. To add an icon for the menu:
    1. Open the /divetab/images folder in the Explorer pane and copy the path of a graphic.
    2. Enter an icon tag and paste the path in the script. For example, icon "/divetab/images/menu icons/34.png".
  8. Expand the sections block, starting with an open brace.
  9. Enter a block for a report-page by specifying the basics: a title, a cPlan, a dimension, and a numeric column. For example:

      report-page { 
        title "Product Group" 
        cplan "/cplans/basic_101.cplan" 
        dimension "Corporate Product Group" 
        text column = "Cases" 
      } 
    
  10. Save Closedthe script.

    Create Report Page

To test the script, the following steps create a link on the menu page to this External Area.

  1. Return to your main menu divetab module in Workbench.
  2. Select the green plus sign and select ClosedLink to External Area.

    Link new menu button to an external area.

  3. In the Select File dialog, find and select the script for the new report page, data_report_page.divetab.
  4. Click Save.
  5. Open your DiveTab client and click Sync.

    Here is the menu Closedbefore Syncing.

    The report page before Syncing.

    Here is the menu Closedafter Syncing.

    The report page after Syncing.

  6. Click on the Report Page Sample button.

Here is the Closedreport page displayed in DiveTab.

Report Page displayed in the client

Here is the report page showing the Closeddefault context menus in DiveTab.

Report page in client with default content menu

NOTE: You can view one context menu at a time.