Adding Expand Sets

If you have a series of expand columns that can be reused on multiple pages, it is a best practice to add them to a definitions block as an expand-set within a column-set. This procedure walks through an example. Once you have examined the cPlan and identified the columns to group together, proceed as follows.

  1. In your Workbench DiveTab project, select New > DiveTab Module.

    The New DiveTab Module dialog displays.

  2. Enter a file Name, and click Finish.

    The graphic version of the module displays.

  3. Click Data Area.

    The new data script displays.

  4. Add a line to the script before the data-area block.

  5. Enter a definitions tag.

  6. Between the open and closing braces, enter an expand-set tag followed by an id attribute and value. ClosedFor example:

    divetab version = "0.0" { 
      definitions { 
        expand-set id = "es-basic" { 
          ... 
        } 
      } 
      data-area id = "data-area-2" { 
        ... 
      } 
    } 
  7. Enter an expand block, with the desired columns, within the expand-set. Be sure to specify a name. Here is an example of an Closedexpand block within an expand-set.

      expand-set id = "es-basic" { 
        expand "Sales and Cases" { 
          
          text column = "Net Sales" { 
            value-format "$#,###.00" 
          } 
          text column = "Discount" { 
            value-format "$#,###.00" 
          } 
          text column = "9 Liter Cases" 
          text column = "BATF Cases" 
        } 
      } 
  8. Define a column-set that uses the new expand-set. Specify the name of the primary column, which is the column that includes the expand option in the context menu. Here is an Closedexample of a column-set.

      column-set id = "cs-basic" { 
        text column = "Cost" { 
          value-format "$#,###.00" 
          expand-set id = "es-basic" 
        } 
      } 

    NOTE: You can also reference the expand-set within the data page. Here is a Closedreport page referencing an expand-set.

      report-page { 
        title "Expand Example 1" 
        cplan "/cplans/basic_102.cplan 
        
        dimension "Resp Team" 
        dimension "Resp SalesPerson" 
        
        text column = "Cost" { 
          value-format "$#,###.00" 
          expand-set id = "es-basic" 
        } 
      } 

    Not including the expand-set within a column-set means that the same set of expand columns can be used for different summary columns.

  9. Add title and icon tags for the data-area block.

  10. Enter a report-page block under sections, using the column-set with the expand columns. Here is an example of a Closedreport-page block.

Here is the Closedresult of the code in DiveTab with the context menu visible.

The report page before expands visible, showing the context menu.

Here is the report page with Closedexpand columns visible.

The report page with expand set visible.

Notice that the 9 Liter Cases and BAFT Cases columns use the default column formatting, that is, no value-format is specified with the text column tags. For more information on how to change the column formatting.

See also: Formatting Column Data