Cross Page Code Samples
The following 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 result of the code in DiveTab.
Here is a code 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 result of the code in DiveTab.
NOTE: Notice that the names of the summary columns are not displayed.
Here is another 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 result of the code in DiveTab.
Here is another 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 result of the code in DiveTab. Clicking on a dive arrow opens the context menu of dimensions to dive on.
See also: QuickView Sets