Alert Code Samples

The following code defines an alert within a column-set, within a definition block.

  alert { 
    alert-style "triangle" 
    value column = "Cases" 
    low-threshold 100 
    high-threshold 1000 
    middle-color "transparent" 
    width 30 
  } 

NOTE: Setting the middle-color to "transparent" results in no alert sign visible.

Here is the Closedresult of the code in DiveTab.

Example of an alert column using triangle alert-styles, and transparent middle values.

Notice how the values that fall between the low and high thresholds are transparent. This is because these values are assigned the transparent color by the middle-color tag.

Here is an example of an alert that uses a summary column to define threshold values:

  report-page { 
    title "Report Page Alert with Column Threshold" 
    cplan "/cplans/basic_102.cplan" 
    
    dimension "Vendor" 
    dimension "Resp Team" 
    
    text column = "Cost" { 
      value-format "$#,###.00" 
    } 
    
    alert "Alert" { 
      alert-style "arrow" 
      value column = "Net Sales" 
      low-threshold column = "Cost" 
      high-threshold column = "Net Sales" 
    } 
    
    text column = "Net Sales" { 
      value-format "$#,###.00" 
    } 
  } 

Here is the Closedresult of the code in DiveTab.

Example of an alert using a threshold column and arrow alert-styles

Here is another example of an alert with customized colors for high and low thresholds, and middle values, in the full page block.

  report-page { 
    title "Alert with Threshold Colors" 
    cplan "/cplans/basic_102.cplan" 
    
    dimension "Vendor" 
    dimension "Resp Team" 
    
    text column = "Cost" { 
      value-format "$#,###.00" 
    }
    
    alert "Alert" { 
      alert-style "triangle" 
      value column = "Cost" 
      low-threshold 10000 
      low-color "009191" 
      high-threshold 100000 
      high-color "da6c00" 
      middle-color "b66dff" 
    } 
    
    text column = "Net Sales" { 
      value-format "$#,###.00" 
    } 
  } 

Here is the Closedresult of the code in DiveTab.

Example of an alert column with customized alert colors.

Here is another example of an alert within a data page block, with the full Report page code sample:

  report-page { 
    title "Report Page Alert" 
    cplan "/cplans/basic_102.cplan" 
    
    dimension "Resp Team" 
    dimension "Vendor" 
    
    alert "Alert" { 
      value column = "Net Sales" 
      low-threshold 10000 
      high-threshold 100000 
      width 100 
    } 
    
    text column = "Net Sales" { 
      value-format "$#,###.00" 
    } 
  } 

Here is the Closedresult of the code in DiveTab.

Example of an alert