AshReports.Layout.IR.Footer (ash_reports v0.1.0)

Intermediate Representation for table footers.

Footers define repeating row sections at the bottom of tables that can repeat on each page.

Examples

footer = AshReports.Layout.IR.Footer.new(
  repeat: true,
  rows: [totals_row_ir]
)

Summary

Functions

Adds a row to the footer.

Creates a new FooterIR struct with the given options.

Returns the number of rows in the footer.

Types

t()

@type t() :: %AshReports.Layout.IR.Footer{
  repeat: boolean(),
  rows: [AshReports.Layout.IR.Row.t()]
}

Functions

add_row(footer, row)

@spec add_row(t(), AshReports.Layout.IR.Row.t()) :: t()

Adds a row to the footer.

new(opts \\ [])

@spec new(Keyword.t()) :: t()

Creates a new FooterIR struct with the given options.

Options

  • :repeat - Whether to repeat on each page (default: false)
  • :rows - List of RowIR for footer content

Examples

iex> AshReports.Layout.IR.Footer.new(repeat: true, rows: [row])
%AshReports.Layout.IR.Footer{repeat: true, rows: [row], ...}

row_count(footer)

@spec row_count(t()) :: non_neg_integer()

Returns the number of rows in the footer.