Adding Expand Columns

As you decide which columns of data to include, you might run out of space and force the user to use the scroll bars. You can minimize scrolling by grouping columns together logically and including them as expansion options for your report and ad hoc pages.

This procedure describes how to add expansion columns.

  1. In Workbench, open the appropriate script. For example, data_report_page.divetab.
  2. To add columns as an expansion of an existing column, add an open brace, {, to the end of the line.
  3. Type in the expand tag with a name followed by an open brace. For example:

      expand "Cases" {
  4. Add text and column tags as appropriate. For example:

      text column = "9 Liter Cases" 
      text column = "BATF Cases" 
  5. Add a closing brace, }.
  6. On a new line, enter another expand tag. For example:

      expand "Sales" {
  7. Add more text and column tags. For example:

      text column = "Net Sales" { 
        value-format "$#,###.00" 
      } 
      text column = "Discount" { 
        value-format "$#,###.00" 
      } 
  8. Add a closing brace, }.
  9. Click Save.
  10. Return to the client, and click Sync.

Here is the Closedcode block with the expands.

  data-area id = "data-area-2" { 
    title "Expand Example" 
    icon "/divetab/images/menu icons/22.png" 
    sections { 
      report-page { 
        title "Expand Example" 
        cplan "/cplans/basic_102.cplan" 
        
        dimension "Premise" 
        dimension "Corporate Product Group" 
        dimension "Corporate Supplier" 
        
        text column = "Cost" { 
          value-format "$#,###.00" 
          expand "Cases" { 
            text column = "9 Liter Cases" 
            text column = "BATF Cases" 
          }
          expand "Sales" { 
            text column = "Net Sales" { 
              value-format "$#,###.00" 
            } 
            text column = "Discount" { 
              value-format "$#,###.00" 
            } 
          } 
        } 
      } 
    } 
  } 

Here is the Closedresult of the code in DiveTab before the column is expanded.

An example of a Report page before the column is expanded.

Here is Closedcontext menu for the expand columns, located under the Cost summary.

Here is the context menu for the summary column and related expand columns.

Here are the Closedexpanded Cases columns.

The expand columns for Cases are visible.

Here are the Closedexpanded Sales columns.

The expand columns for Sales are visible.

This example shows two separate expansion groups for one summary column. The DiveTab user can only select one at a time.

Expansion groups can be added for multiple columns on a page.

See also: