AshReports.Layout.IR.Header (ash_reports v0.1.0)
Intermediate Representation for table headers.
Headers define repeating row sections at the top of tables that can repeat on each page or at group boundaries.
Repeat Behavior
true- Header repeats on every pagefalse- Header appears only at the start:group- Header repeats at group boundaries
Examples
header = AshReports.Layout.IR.Header.new(
repeat: true,
level: 1,
rows: [row_ir1, row_ir2]
)
Summary
Functions
Adds a row to the header.
Creates a new HeaderIR struct with the given options.
Returns the number of rows in the header.
Types
@type repeat() :: boolean() | :group
@type t() :: %AshReports.Layout.IR.Header{ level: non_neg_integer(), repeat: repeat(), rows: [AshReports.Layout.IR.Row.t()] }
Functions
@spec add_row(t(), AshReports.Layout.IR.Row.t()) :: t()
Adds a row to the header.
Creates a new HeaderIR struct with the given options.
Options
:repeat- Repeat behavior (default:true):level- Header level for nested headers (default: 0):rows- List of RowIR for header content
Examples
iex> AshReports.Layout.IR.Header.new(repeat: true, rows: [row])
%AshReports.Layout.IR.Header{repeat: true, rows: [row], ...}
@spec row_count(t()) :: non_neg_integer()
Returns the number of rows in the header.