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
- Create a Business Rule of type CubeView Extender (a distinct Business Rule type, not a Finance sub-type)
- 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
- Custom Report Task =
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
| Category | Example tokens | Resolves 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:
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.Common Formatting Tasks
Inside the
FormatReportUIItem pass, branch on uiItem.UIItemType (an XFReportUIItemType) and use the item's members:| Task | UIItemType to match | How |
|---|---|---|
| Dynamic logo | PageHeaderPictureBoxLogo | uiItem.SetPictureBoxImage(...) with the logo file |
| Header / subtitle text | PageHeaderLabelTitle, PageHeaderLabelLeft1, … | set uiItem.Text, uiItem.FontSize, uiItem.Bold |
| Relabel column / row headers | ColHeaderLabel / RowHeaderLabel | read GetColHeaderName() / GetRowHeaderName(...), set uiItem.Text |
| Conditional cell styling | DataCellLabel | inspect uiItem.XFAmount / uiItem.XFHasData, set uiItem.TextColor |
| Page numbering | PageFooterPageNumber / PageHeaderPageNumber | uiItem.SetPageNumberDisplayInfo(includeCount, format) |
Related Content
- Data Input with Cube Views — Previous guide: configuring Cube Views for data entry
- Report Books — Next guide: compiling Cube Views into distributable packages
- Getting Started with Business Rules — Business Rule fundamentals, including rule types and the development workflow
- Workflow Substitution Variables — WF-prefixed substitution variables available in Cube View headers