Cube Views

CubeView Extender Business Rules

CubeView Extender Business Rules apply advanced formatting to Cube Views in Report view — dynamic headers, logos, page numbering, and conditional styling that goes beyond the built-in formatting properties. This guide covers configuration, common use cases, substitution variables, and code examples.

What CubeView Extender Rules Do

CubeView Extender rules run when a Cube View renders in Report view (PDF-style output). They do not affect the Data Explorer grid view. The rule receives the rendered report and can modify headers, footers, cell formatting, and layout before the final output is generated.
Use CubeView Extender rules when you need formatting that:
  • Changes dynamically based on the POV (different logo per entity, different title per scenario)
  • Requires logic (conditional styling based on data values or user context)
  • Involves report elements not available in built-in properties (custom page numbering, footer fields)

Configuration

Setting Up a CubeView Extender Rule

  1. Create a Business Rule of type CubeView Extender (a distinct Business Rule type, not a Finance sub-type)
  2. On the Cube View's General Settings, under Report properties, set:
    • Custom Report Task = Execute Cube View Extender Business Rule
    • Business Rule = the name of your Business Rule

Inline Formula Alternative

For simple expressions that don't require a full Business Rule, use the inline formula approach:
  • Custom Report Task = Execute Cube View Extender Formula
  • Formula = the expression to evaluate
Inline formulas are limited to simple property assignments. Use a full Business Rule for anything involving conditional logic, loops, or multiple formatting changes.

Substitution Variables in Cube Views

Cube Views support substitution variables in report headers, footers, and other text fields. Variables resolve at runtime based on the current context. They are referenced with pipes around a single concatenated token (e.g. |POVEntity|) — not a dotted prefix.

Variable Categories

CategoryExample tokensResolves To
POV|POVEntity|, |POVScenario|, |POVTime|Current POV member name
Workflow|WFProfile|, |WFScenario|, |WFTime|Current workflow context
Cube View|CVName|Cube View properties
User / date|UserName|, |DateDDMMYYYY|User and date fields

Using Variables in Headers and Footers

The Cube View designer provides Report Header and Report Footer sections for adding header and footer fields. Each field can contain substitution variables:
plaintext
1Header Left:   |POVEntity| - |POVScenario|
2Header Center: |CVName|
3Header Right:  |DateDDMMYYYY|
4
5Footer Left:   Confidential
6Footer Right:  |WFProfile|
Page numbering is a report page-info field configured on the header/footer (or set from an extender via SetPageNumberDisplayInfo), not a substitution variable.

Writing an Extender Rule

A CubeView Extender rule receives a CVExtenderArgs and is invoked with two function types (CVExtenderFunctionType): GetReportOptions (return page/margin options once) and FormatReportUIItem (called for each report element so you can format it). Branch on args.FunctionType; in the formatting pass, inspect args.Report.CurrentUIItem — an ICVExtenderReportUIItem whose UIItemType tells you which element you are formatting.
1Public Function Main(ByVal si As SessionInfo, _
2  ByVal globals As BRGlobals, _
3  ByVal api As Object, _
4  ByVal args As CVExtenderArgs) As Object
5  Try
6      Select Case args.FunctionType
7
8          Case CVExtenderFunctionType.GetReportOptions
9              ' Return report-level options (margins, header/footer band heights)
10              Dim reportOptions As New CVExtenderReportOptions()
11              reportOptions.PageHeaderTitlesHeight = 60
12              Return reportOptions
13
14          Case CVExtenderFunctionType.FormatReportUIItem
15              ' Format the current report element based on its type
16              Dim uiItem As ICVExtenderReportUIItem = args.Report.CurrentUIItem
17
18              Select Case uiItem.UIItemType
19
20                  ' Relabel a column header using its member name
21                  Case XFReportUIItemType.ColHeaderLabel
22                      Dim colMember As String = uiItem.GetColHeaderName()
23                      uiItem.Text = colMember & " Amount"
24                      uiItem.SetFontStyle(True, False, False)
25
26                  ' Show "Page X of Y" on the footer page-number field
27                  Case XFReportUIItemType.PageFooterPageNumber
28                      uiItem.SetPageNumberDisplayInfo(True, "Page {0} of {1}")
29
30              End Select
31      End Select
32
33      Return Nothing
34  Catch ex As Exception
35      Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
36  End Try
37End Function

Common Formatting Tasks

Inside the FormatReportUIItem pass, branch on uiItem.UIItemType (an XFReportUIItemType) and use the item's members:
TaskUIItemType to matchHow
Dynamic logoPageHeaderPictureBoxLogouiItem.SetPictureBoxImage(...) with the logo file
Header / subtitle textPageHeaderLabelTitle, PageHeaderLabelLeft1, …set uiItem.Text, uiItem.FontSize, uiItem.Bold
Relabel column / row headersColHeaderLabel / RowHeaderLabelread GetColHeaderName() / GetRowHeaderName(...), set uiItem.Text
Conditional cell stylingDataCellLabelinspect uiItem.XFAmount / uiItem.XFHasData, set uiItem.TextColor
Page numberingPageFooterPageNumber / PageHeaderPageNumberuiItem.SetPageNumberDisplayInfo(includeCount, format)
ℹ️Info
There is no args.PointOfView, args.ReportHeader, args.ReportFooter, or args.Columns. All formatting is done by inspecting and setting properties on args.Report.CurrentUIItem during the FormatReportUIItem pass. To vary output by POV, declare custom substitution variables and read them from args.CustomSubstVars.
ℹ️Info
CubeView Extender rules only affect Report view output. If you need dynamic formatting in the Data Explorer grid view, use conditional formatting in the Cube View properties instead, or apply formatting via a Dashboard Business Rule when the Cube View is embedded in a dashboard.