What is a Column Set?

A column set allows you to set up a template of columns which can be called from tabular pages. If you want to modify the column set, you only need to change it in one place and have it reflected in multiple places in the script.

A column-set is created within a definition block, and is referenced using an id tag elsewhere in the script. A column-set can be used within a report, ad hoc, cross, or dive page.

NOTE: Cross pages and Tables can also call column-sets, but the expand tag is ignored when in use.

Here is an example of a Closedreport page without a column-set.

  report-page { 
    title "RP - Time Series" 
    cplan "/cplans/basic_timeseries.cplan" 
    dimension "Resp Team" 
    
    text "Cases" column = "Cases" 
    text "Cases Y" column = "Cases Y" 
    text "Cases Y-1" column = "Cases Y Y-1" 
    text "Cases Y-2" column = "Cases Y Y-2" 
    text "Cases Y-3" column = "Cases Y Y-3" 
  } 

Here is the Closedsame report page with a column-set.

  definitions { 
    column-set id = "cs-basic" { 
      text "Cases" column = "Cases" 
      text "Cases Y" column = "Cases Y" 
      text "Cases Y-1" column = "Cases Y Y-1" 
      text "Cases Y-2" column = "Cases Y Y-2" 
      text "Cases Y-3" column = "Cases Y Y-3" 
    } 
  } 
  data-area id = "NY Data" { 
    title "Report Pages <br> Column Sets" 
    icon "/divetab/images/Data288.png" 
   
    sections { 
      report-page { 
        title "RP - Time Series" 
        cplan "/cplans/basic_timeseries.cplan" 
        dimension "Resp Team" 
        column-set id = "cs-basic" 
      } 
    } 
  } 

Here is the Closedresult of the code in DiveTab.

Screenshot of report page used in example; same screenshot for using text-columns or column-sets

NOTE: The report page appears the same way using these two different methods.

You can define a column-set when you are using a group of columns repeatedly within a data-area and these columns will remain the same. When there are changes, you update the column set, rather than each column. These changes are then applied everywhere that the column-set is used.

You can use the same column set more than once for a single page-type block, and use parameters to customize it. If you plan on using the same columns multiple times, you can apply parameters to vary them, and use a column set instead of rewriting the code. This can save a lot of time by making changes once to the column-set in the definitions block. Then, those changes are reflected wherever the set is referenced.

You can use column sets to call other column sets. This is useful if you want to use multiple preexisting column sets, but do not want to reference each of them every time.

See also: