ReportAnalysis class

Defines a specific analysis or slice of the report dataset.

A single ReportDefinition can contain multiple analyses, each rendered as a distinct sheet in Excel or a section in PDF.

Constructors

ReportAnalysis({required String id, required String title, String? subtitle, ReportAnalysisType type = ReportAnalysisType.grouped, List<String> groupBy = const [], List<String>? detailColumns, ReportDateGrouping? dateGrouping, Map<String, List<ReportCategoryBucket>>? categoryBuckets, List<ReportMeasure> measures = const [], String? rowDimension, String? columnDimension, ReportMeasure? crossTabMeasure, List<ReportFilter> filters = const [], List<ReportSort> sort = const [], ReportTopN? topN, bool showSubtotals = true, bool showGrandTotal = true, bool sheetPerCategory = false, String missingCategoryLabel = 'Unassigned', Map<String, dynamic>? customData, ReportChartConfig? chart})
const
ReportAnalysis.crossTab({required String id, required String title, String? subtitle, required String rowDimension, required String columnDimension, required ReportMeasure measure, List<ReportFilter> filters = const [], bool showGrandTotal = true, String missingCategoryLabel = 'Unassigned', Map<String, dynamic>? customData})
Factory for creating a 2D Pivot / Cross-Tabulation summary.
factory
ReportAnalysis.detail({required String id, required String title, String? subtitle, List<String>? columns, List<ReportFilter> filters = const [], List<ReportSort> sort = const [], bool showGrandTotal = true, List<ReportMeasure> grandTotalMeasures = const [], Map<String, dynamic>? customData, ReportChartConfig? chart})
Factory for creating a flat record detail listing.
factory
ReportAnalysis.grouped({required String id, required String title, String? subtitle, required List<String> groupBy, required List<ReportMeasure> measures, List<String>? detailColumns, ReportDateGrouping? dateGrouping, Map<String, List<ReportCategoryBucket>>? categoryBuckets, List<ReportFilter> filters = const [], List<ReportSort> sort = const [], ReportTopN? topN, bool showSubtotals = true, bool showGrandTotal = true, bool sheetPerCategory = false, String missingCategoryLabel = 'Unassigned', Map<String, dynamic>? customData, ReportChartConfig? chart})
Factory for creating a grouped summary table.
factory
ReportAnalysis.summary({required String id, required String title, String? subtitle, required List<ReportMeasure> measures, List<ReportFilter> filters = const [], Map<String, dynamic>? customData})
Factory for creating an executive summary card / metrics overview.
factory

Properties

categoryBuckets → Map<String, List<ReportCategoryBucket>>?
Custom category buckets keyed by column ID (e.g. for aging or salary tiers).
final
chart → ReportChartConfig?
Optional chart or graph configuration rendered alongside this analysis.
final
columnDimension → String?
Column dimension for cross-tabulation analysis.
final
crossTabMeasure → ReportMeasure?
Value measure to populate cross-tabulation cells.
final
customData → Map<String, dynamic>?
Additional metadata or KPI cards attached to this analysis.
final
dateGrouping → ReportDateGrouping?
Date grouping configuration.
final
detailColumns → List<String>?
Column IDs to include in a detail analysis. If empty, all columns are included.
final
filters → List<ReportFilter>
Pre-filters applied to records before grouping and aggregation.
final
groupBy → List<String>
List of column IDs to group by (e.g. ['department', 'bank']).
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier for this analysis.
final
measures → List<ReportMeasure>
Measures and metrics to calculate for each group.
final
missingCategoryLabel → String
Label used when a grouping category is null or empty.
final
rowDimension → String?
Row dimension column for cross-tabulation analysis.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sheetPerCategory → bool
Whether to split each top-level category into its own Excel sheet or PDF sub-section.
final
showGrandTotal → bool
Whether to display a grand totals row at the bottom.
final
showSubtotals → bool
Whether to display subtotals for nested groups.
final
sort → List<ReportSort>
Sorting configuration for groups or records.
final
subtitle → String?
Subtitle or narrative description.
final
title → String
User-visible title (used as sheet name in Excel and section header in PDF).
final
topN → ReportTopN?
Top-N ranking configuration.
final
type → ReportAnalysisType
Analysis type.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited