API Reference
ReportViewBuilder
Helper to shape HTML report views without changing rule code. Lets you add summary fields and counters, define sections (including filtered/conditional ones), and highlight rows or values. Works with both object graphs and root lists via the special "$" path.
Inheritance
- Object
- ReportViewBuilder
Examples
// Build a view with summary fields, a filtered section, and highlights
var view = new ReportViewBuilder()
// top chips
.SummaryField("Total DCs", "$.Count")
.SummaryCountWhere("Stopped services", "$", "Status", "Stopped")
// main section
.Section("Domain Controllers", "DomainControllers", ViewMode.Table)
// filtered section: high CPU rows
.SectionWhereGreaterThan("High CPU", "DomainControllers", "CpuPercent", 90, ViewMode.Table)
// highlight values in the last section
.HighlightLastSectionOp("CpuPercent", FilterOperator.GreaterThan, 90, HighlightColor.Red)
.HighlightLastSectionBool("IsPdc", HighlightColor.Blue, HighlightColor.Gray, HighlightTarget.Cell);
Constructors
public ReportViewBuilder() #Methods
public ReportViewBuilder DescriptionLastSection(String text) #ReportViewBuilderAdds a description to the most recently added section. Renderers show it above the section’s content. Supports parameter replacement for rule parameters (e.g., "≤ {DomainAdminsMax}").
Parameters
- text System.String
public ReportViewBuilder HighlightLastSection(String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderAdds a simple equals-based highlight rule to the most recently added section.
Parameters
- column System.String
- equalsValue System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionBetweenParameter(String column, String minParameterKey, String maxParameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderHighlights rows where Parameter(minParameterKey) ≤ column ≤ Parameter(maxParameterKey).
Parameters
- column System.String
- minParameterKey System.String
- maxParameterKey System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionBool(String column, HighlightColor whenTrue, HighlightColor whenFalse, HighlightTarget target = Cell) #ReportViewBuilderConvenience helper for boolean columns: apply one color when true and another when false. Implemented as two operator-based rules to preserve nulls as unstyled.
Parameters
- column System.String
- whenTrue TestimoX.Definitions.HighlightColor
- whenFalse TestimoX.Definitions.HighlightColor
- target TestimoX.Definitions.HighlightTarget = Cell
public ReportViewBuilder HighlightLastSectionGreaterThanOrEqualParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderHighlights rows where column ≥ Parameter(parameterKey).
Parameters
- column System.String
- parameterKey System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionGreaterThanParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderHighlights rows where column > Parameter(parameterKey).
Parameters
- column System.String
- parameterKey System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionLessThanOrEqualParameter(String column, String parameterKey, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderHighlights rows where column ≤ Parameter(parameterKey).
Parameters
- column System.String
- parameterKey System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionNotEquals(String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderAdds a highlight rule to the most recently added section: highlight rows where column ≠ equalsValue.
Parameters
- column System.String
- equalsValue System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightLastSectionOp(String column, FilterOperator op, Object value, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderAdds an operator-based highlight rule to the most recent section, comparing column with value using op.
Parameters
- column System.String
- op TestimoX.Definitions.FilterOperator
- value System.Object
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder HighlightSection(String path, String column, String equalsValue, HighlightColor color = Yellow, HighlightTarget target = Row) #ReportViewBuilderAdds a highlight rule to the most recent section matching the given path. Useful when multiple sections are added and ordering would make HighlightLastSection ambiguous.
Parameters
- path System.String
- column System.String
- equalsValue System.String
- color TestimoX.Definitions.HighlightColor = Yellow
- target TestimoX.Definitions.HighlightTarget = Row
public ReportViewBuilder LegendLastSection(String text) #ReportViewBuilderAdds a small legend/note under the most recently added section. Text supports parameter replacement for rule parameters, e.g. "≤ {DomainAdminsMax}".
Parameters
- text System.String
public ReportViewBuilder NoStandardHighlights() #ReportViewBuilderDisables the global Status/Success table highlighters for the most recently added section. Use when a section has its own explicit per-cell highlights and enum values like "Enabled" should not be recolored.
public ReportViewBuilder Section(String title, String path, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a report section rendering the value at path. Use "$" to target the rule's results collection (root) when the source returns a list directly. For anchored properties on a wrapper object (e.g., a property named "Servers"), pass "Servers".
Parameters
- title System.String
- path System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionDescription(String path, String text) #ReportViewBuilderSets a description for the section targeting path.
Parameters
- path System.String
- text System.String
public ReportViewBuilder SectionIfNotEmpty(String title, String path, ViewMode mode = Auto, Nullable<Int32> maxRows = null, Boolean countEvenIfZero = false) #ReportViewBuilderAdds a section that is only rendered when the value at path is a non-empty enumerable. Optionally contributes a zero-valued counter to the Summary breakdown even when empty.
Parameters
- title System.String
- Section title.
- path System.String
- Property path or "$" for the root collection.
- mode TestimoX.Definitions.ViewMode = Auto
- Rendering mode.
- maxRows System.Nullable{System.Int32} = null
- Optional maximum rows to render.
- countEvenIfZero System.Boolean = false
- When true, the section will be listed in the Summary breakdown counters even if the resolved collection is empty (count = 0).
public ReportViewBuilder SectionLegend(String path, String text) #ReportViewBuilderSets a legend/note for the section targeting path.
Parameters
- path System.String
- text System.String
public ReportViewBuilder SectionResults(String title, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a section that targets the overall results collection (for rules that return a list directly). Equivalent to Section(title, "$", ...).
Parameters
- title System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhere(String title, String path, String filterProperty, Object equalsValue, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps only items where filterProperty equals equalsValue. Values are matched loosely (bool/number/string). Path may point to a collection property (e.g., "Servers") or to "$" for the results root when the source returns a list.
Parameters
- title System.String
- Section title.
- path System.String
- Property path or "$" for the root collection.
- filterProperty System.String
- Property name to compare.
- equalsValue System.Object
- Value to match.
- mode TestimoX.Definitions.ViewMode = Auto
- Rendering mode hint.
- maxRows System.Nullable{System.Int32} = null
- Optional maximum rows to render.
public ReportViewBuilder SectionWhereBetweenParameter(String title, String path, String filterProperty, String minParameterKey, String maxParameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps only items where filterProperty is between two rule parameters (inclusive). Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- minParameterKey System.String
- maxParameterKey System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereGreaterThan(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps items where filterProperty > value.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- value System.Object
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereGreaterThanOrEqual(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps items where filterProperty ≥ value.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- value System.Object
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereGreaterThanOrEqualParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section using a parameter value. Keeps items where filterProperty ≥ value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- parameterKey System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereGreaterThanParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section using a parameter value. Keeps items where filterProperty > value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- parameterKey System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereIn(String title, String path, String filterProperty, Object values, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section using a membership list. Keeps items where filterProperty is in values. values can be an IEnumerable or a ParameterRef that resolves to an array/list. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- values System.Object
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereLessThan(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps items where filterProperty < value. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- value System.Object
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereLessThanOrEqual(String title, String path, String filterProperty, Object value, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section that keeps items where filterProperty ≤ value.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- value System.Object
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereLessThanOrEqualParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section using a parameter value. Keeps items where filterProperty ≤ value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- parameterKey System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SectionWhereLessThanParameter(String title, String path, String filterProperty, String parameterKey, ViewMode mode = Auto, Nullable<Int32> maxRows = null) #ReportViewBuilderAdds a filtered section using a parameter value. Keeps items where filterProperty < value of rule parameter parameterKey. Use "$" for path to target the results root when the source returns a list.
Parameters
- title System.String
- path System.String
- filterProperty System.String
- parameterKey System.String
- mode TestimoX.Definitions.ViewMode = Auto
- maxRows System.Nullable{System.Int32} = null
public ReportViewBuilder SummaryCountWhere(String title, String path, String filterProperty, Object equalsValue) #ReportViewBuilderAdds a computed counter that counts items at path where filterProperty equals equalsValue.
Parameters
- title System.String
- Counter title.
- path System.String
- Collection property path or "$" for the results root.
- filterProperty System.String
- Property name to compare.
- equalsValue System.Object
- Value to match.
public ReportViewBuilder SummaryCountWhereInAndEqualsParameter(String title, String path, String inProperty, String listParameterKey, String filterProperty, Object equalsValue) #ReportViewBuilderAdds a computed counter that counts items at path where (inProperty IN values of rule parameter listParameterKey) AND (filterProperty equals equalsValue).
Parameters
- title System.String
- path System.String
- inProperty System.String
- listParameterKey System.String
- filterProperty System.String
- equalsValue System.Object
public ReportViewBuilder SummaryField(String title, String path) #ReportViewBuilderAdds a single summary field with a friendly title. Path may be a nested property (e.g., "Servers.Count"). Use "$" to target the rule's results collection (root) when the source returns a list directly. Example: SummaryField("Total DCs", "$")
Parameters
- title System.String
- path System.String
public ReportViewBuilder SummaryFields(params String[] paths) #ReportViewBuilderAdds raw summary fields by property path. Use "$" as the path to target the rule's results collection (root) when the source returns a list directly. For anchored properties (e.g., an object with a property named "Servers"), pass "Servers.Count".
Parameters
- paths System.String[]
public ReportViewBuilder SummaryParameter(String title, String parameterKey) #ReportViewBuilderAdds a summary item that displays the value of a rule parameter.
Parameters
- title System.String
- parameterKey System.String