Trouble Viewing Images? Right-click on any image and select "Open in new tab" to view a larger version. You can also zoom in using Ctrl + Mouse Wheel for easier readability.
Article Goal
Learn how to apply conditional formatting at the Group or Report level using aggregate functions like Sum(), Max(), etc., within Finished Reports in VDM.
What Is Group/Report Level Conditional Formatting?
Conditional formatting at the group or report level allows you to visually highlight data (e.g., change text color or visibility) based on summary values. However, typical sumSum() or sumMax() functions aren’t directly available in the property expression editors (e.g., Foreground Color or Visible). To work around this, group aggregate syntax must be used instead.
Note: These expressions compare group-level values using structured filters inside the expression editor and not the built-in summary options.
Use Case
You want to display a label in green only if the total Freight for an EmployeeID group exceeds $9,000. If it doesn’t, the label should appear in red or be hidden entirely.
Where Is It Used?
This technique is most useful in Group Headers, Footers, or Report-wide summary sections where aggregated totals influence formatting decisions.
Download Sample
Steps to Apply Group/Report Level Conditional Formatting
Step 1: Open the Finished Reports Designer
Open or create a View.
Run the View, then click on Finished Reports Designer.
Step 2: Ensure the Report Is Grouped
Group the report on the field you wish to conditionally evaluate (e.g.,
EmployeeID).
Step 3: Add Your Labels
Add a label to the Group Header or Footer and set its Summary to Group level.
Step 4: Set the Expression for the Property
-
Click on the label and choose the property to modify, such as:
Foreground Color
Visible
Step 5: Use Group Aggregate Expressions
Use this format in the Expression Editor to compare grouped values:
-
Foreground Color Example:
Iif([][[EmployeeID] == [^.EmployeeID]].Sum([Freight]) > 9000, 'Green', 'Red') -
Visible Property Example:
Iif([][[EmployeeID] == [^.EmployeeID]].Sum([Freight]) > 9000, 'True', 'False')
Note: The syntax [^^.FieldName] refers to the parent level in the grouping context.
Step 6: Preview the changes
View your Finished Report to verify the desired changes.
Article Summary
Group and report-level conditional formatting lets you dynamically style Finished Reports based on aggregated data values. By using group aggregate functions inside property expressions, you can show or hide elements, change colors, and create more meaningful visual reports.
Use Case: Highlight top-performing sales employees in green when their grouped sales total exceeds a certain threshold, and mark others in red or hide their labels.
Comments
0 comments
Please sign in to leave a comment.