Cross Page Code Samples

The Closedfollowing code sample creates a cross page with two summaries.

  cross-page { 
    title "Cross Page 1" 
    cplan "/cplans/basic_101.cplan" 
    
    dimension "Corporate Brand" 
    cross-dimension "Resp Team" 
    
    text column = "Cost" { 
      value-format "$#,###.00" 
    } 
    text column = "Cases" { 
      value-format "#,###.00" 
    } 
  } 

This is the Closedresult of the code in DiveTab.

Example of a cross page with two summaries

Here is a Closedcode sample for a cross page that uses one summary column.

  cross-page { 
    title "Product Cases by Premise" 
    cplan "/cplans/basic_101.cplan" 
    
    dimension "Product Name" 
    cross-dimension "Premise" 
    
    no-summary-column 
    text column = "Cases" { 
      value-format "#,###.00" 
    } 
  } 

TIP: The no-summary-column tag hides the summary name. You can include the column name in the page title for clarity.

Here is the Closedresult of the code in DiveTab.

NOTE: Notice that the names of the summary columns are not displayed.

Example of a Cross page with one summary column.

Here is Closedanother code sample for a cross page that uses QuickViews, as well as specified column headings for the Cost and Net Sales summaries using the text tag.

  cross-page { 
    title "Cross Page 2" 
    cplan "/cplans/basic_101.cplan" 
    
    quickview-set { 
      cplan "/cplans/basic_101.cplan" 
      dimension-quickview "Premise" 
      dimension-quickview "Resp Team" 
    } 
    dimension "Premise" 
    cross-dimension "Resp Team" 
    
    text column = "Cases" { 
      value-format "#,###.00" 
    } 
    text "Cost in Dollars" column = "Cost" { 
      value-format "$#,###.00" 
    } 
    text "Net Sales in Dollars" column = "Net Sales" { 
      value-format "$#,###.00" 
    } 
  } 

TIP: You can use a dimension-quickview that is not included as a dimension or a cross dimension. In this cross page example, the Dimension QuickViews Premise and Resp Team serve as filters, initially displaying all values.

This is the Closedresult of the code in DiveTab.

Example of a cross page with three summaries and a quickview set

Here is Closedanother code sample for a cross page with available dimensions, which are indicated by dive arrows in DiveTab.

  cross-page {
    title "Cross Page with Dive Arrows"
    cplan "/cplans/basic_101.cplan"
        
    quickview-set {
      cplan "/cplans/basic_101.cplan"
      dimension-quickview "Resp Team"
    }
    dimension "Corporate Supplier"
    available-dimension "Customer"
    available-dimension "Product Family"
    available-dimension "Product Name"
    cross-dimension "Premise"
        
    text column="Cases" {
      value-format "#,###.00"
    }
    text column="Cost" {
      value-format "#,###.00"
    }
    text column="Net Sales" {
      value-format "#,###.00"
    }
  }

This is the Closedresult of the code in DiveTab. Clicking on a dive arrow opens the context menu of dimensions to dive on.

An example of a cross page with dive arrows.

See also: QuickView Sets