Ad Hoc Page Code Samples
The following code sample creates an ad hoc page with a dimension and two dive dimensions.
ad-hoc-page { title "Ad Hoc Page Ex 01" cplan "/cplans/basic_101.cplan" dimension "MCD Name" dimcount-dimension "DMA Name" dimcount-dimension "Ethnic Type" text column = "Cases" { value-format "#,###.00" } text column = "9 Liter Cases" { value-format "#,###.00" } }
Here is the result of the code in DiveTab.
NOTE: Dive dimensions are collapsed initially and can then be expanded in the client.
The context menu in the first dimension allows you to switch dimensions.
When you switch dimensions, the dimension becomes a dive dimension and the dive dimension that you selected becomes the dimension in DiveTab.
NOTE: Any changes the user makes in the DiveTab client are temporary. You must modify the code to make permanent changes.
Here is an example with dimension MCD Name switched with dive dimension DMA Name.
Notice that MCD Names now appears as a dive dimension and DMA Names as a dimension.
The yellow columns indicate DimCounts, which have active links for diving. Here is the result when you select the dive dimension MCD Name value link for dimension DMA Name value NEW YORK.
The words in the darker blue title, DMA Name: NEW YORK | MCD Name, indicate the dimension value and the summary from the parent page; the intersecting value contains the link to the page shown in the previous image.
The following code block creates an example of an ad hoc page with more columns.
ad-hoc-page { cplan "/cplans/basic_101.cplan" title "Ad Hoc Page Ex 02" dimension "MCD Name" dimcount-dimension "Corporate Supplier" dimcount-dimension "Corporate Brand" dimcount-dimension "Customer" dimcount-dimension "Premise" quickview-dimension "Corporate Product Sub Group" available-dimension "Corporate Product Group" available-dimension "Corporate Item" text column = "Cost" { value-format = "$#,###.00" } text column "Net Sales" { value-format "$#,###.00" } available-columns { text column = "Cases" } }
Here is the result of the code in DiveTab.
Notice that the first dimension column is not considered a MultiColumn.
Here is a context menu for a dive dimension, which allows adding it as a MultiColumn.
Here is the result when the Corporate Supplier dive dimension is added as a MultiColumn.