Conditionalized Links

A conditionalized link is one that only appears if certain conditions are met. If the text column value meets the conditions, a link is active. If the value does not meet the conditions, the link is not active.

Here is an Closedexample of a report page with a conditionalized link column where the condition is that only values greater than 1,000,000 have active links.

Example of a page using a conditionalized link.

NOTE: The active links are shaded blue and the not active links are shaded gray.

Here is the Closedresulting page for following value Daniel.

The resulting page after following the link for ARROWOOD.

Here is how the Closedconditionalized link appears in the code.

  sections { 
    report-page { 
      title "Conditionalized Links" 
      cplan "/cplans/invoice.cplan" 
      
      dimension "Division Manager" 
      text column = "Bottles" { 
        link { 
          condition column = "BinaryCalc" 
          page id = "pg-target" 
        } 
      }
    } 
  } 
  
  pages { 
    report-page id = "pg-target" { 
      title "Target Page" 
      cplan "/cplans/invoice.cplan" 
      
      parameter "Division Manager" 
      parameter "Premise"
      dimension "Product Type" 
      text column = "Bottles" 
    } 
  } 

If the condition column is not empty, the link is active. An active link is indicated by shading the cell light blue.

Here is the calc from the cPlan that determines the conditions for the condition column.

  calc "BinaryCalc" `if(add(value("Bottles")) > 1000000, "1", "")`

If the condition column uses the same column it is included in, then the condition is determined by whether a value is specified or not.

Here is an example of a condition column that uses the same column.

  text column = "Chain Store ID" { 
    link {
      condition column = "Chain Store ID" 
      page id = "rp-sales" 
    } 
  }

For this example, if a Chain Store ID is not provided, a link is not present.