AshReports.Report (ash_reports v0.1.0)

Represents a report definition with its structure, data source, and configuration.

Summary

Functions

Gets the band with the given name from the report.

Gets all bands of a specific type from the report.

Gets the group with the given name or level.

Gets the parameter with the given name.

Gets the variable with the given name.

Creates a new Report struct with the given name and options.

Types

t()

@type t() :: %AshReports.Report{
  bands: [AshReports.Band.t()],
  base_filter: Ash.Expr.t() | nil,
  description: String.t() | nil,
  driving_resource: atom(),
  formats: [:html | :pdf | :heex | :json],
  groups: [AshReports.Group.t()],
  name: atom(),
  parameters: [AshReports.Parameter.t()],
  permissions: [atom()],
  title: String.t() | nil,
  variables: [AshReports.Variable.t()]
}

Functions

get_band(report, name)

@spec get_band(t(), atom()) :: AshReports.Band.t() | nil

Gets the band with the given name from the report.

get_bands_by_type(report, type)

@spec get_bands_by_type(t(), atom()) :: [AshReports.Band.t()]

Gets all bands of a specific type from the report.

get_group(report, name)

@spec get_group(t(), atom() | pos_integer()) :: AshReports.Group.t() | nil

Gets the group with the given name or level.

get_parameter(report, name)

@spec get_parameter(t(), atom()) :: AshReports.Parameter.t() | nil

Gets the parameter with the given name.

get_variable(report, name)

@spec get_variable(t(), atom()) :: AshReports.Variable.t() | nil

Gets the variable with the given name.

new(name, opts \\ [])

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

Creates a new Report struct with the given name and options.