class OpenCReport\Report {
public final get_next():
?OpenCReport\Report;
public final variable_new(
long $variable_type,
string $name,
string $expr,
?string $ignoreexpr = null,
?string $reset_on_break_name = null,
?bool $precalculate = false):
OpenCReport\Variable;
public final variable_new_full(
long $result_type,
string $name,
?string $baseexpr = null,
?string $ignoreexpr = null,
?string $intermedexpr = null,
?string $intermed2expr = null,
?string $resultexpr = null,
?string $reset_on_break_name = null,
?bool $precalculate = fals):
OpenCReport\Variable;
public full variable_get_first():
?OpenCReport\Variable;
public final expr_parse(
string $expr_string):
?OpenCReport\Expr;
public final expr_error(): ?string;
public final resolve_variables(): void;
public final evaluate_variables(): void;
public final break_new(
?string $name):
OpenCReport\ReportBreak;
public final break_get(
string $break_name):
OpenCReport\ReportBreak;
public final break_get_first():
?OpenCReport\ReportBreak;
public final resolve_breaks(): void;
public final get_query_rownum(): long;
public final add_start_cb(
string $callback): void;
public final add_done_cb(
string $callback): void;
public final add_new_row_cb(
string $callback): void;
public final add_iteration_cb(
string $callback): void;
public final add_precalculation_done_cb(
string $callback): void;
public final equals(
OpenCReport\Report $report):
bool;
public final set_main_query(
OpenCReport\Query $query): void;
public final set_main_query_by_name(
string $query_name): void;
public final set_suppress(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_suppress():
?OpenCReport\Expr;
public final set_iterations(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_iterations():
?OpenCReport\Expr;
public final set_font_name(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_font_name():
?OpenCReport\Expr;
public final set_font_size(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_font_size():
?OpenCReport\Expr;
public final set_height(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_height():
?OpenCReport\Expr;
public final set_fieldheader_priority(
?string $expr_string = null):
?OpenCReport\Expr;
public final get_fieldheader_priority():
?OpenCReport\Expr;
public final nodata(): OpenCReport\Output;
public final header(): OpenCReport\Output;
public final footer(): OpenCReport\Output;
public final field_header(): OpenCReport\Output;
public final field_details(): OpenCReport\Output;
}
Get the next object in the chain of reports.
This method may only be used on an object created
with OpenCReport\Column::report_get_first(),
i.e. one that was internally marked as an iterator
object.
public final
OpenCReport\Report::get_next():
?OpenCReport\Report;
Create a new variable of the specified type and
name, using the expression to produce the value.
Optionally a break name (see Report breaks)
may be specified, where, upon a break change,
the variable is reset. See Report variables.
For class methods of
OpenCReport\Variable,
see Section 12.14.
public const OpenCReport\Report::VARIABLE_EXPRESSION;
public const OpenCReport\Report::VARIABLE_COUNT;
public const OpenCReport\Report::VARIABLE_COUNTALL;
public const OpenCReport\Report::VARIABLE_SUM;
public const OpenCReport\Report::VARIABLE_AVERAGE;
public const OpenCReport\Report::VARIABLE_AVERAGEALL;
public const OpenCReport\Report::VARIABLE_LOWEST;
public const OpenCReport\Report::VARIABLE_HIGHEST;
public final
OpenCReport\Report::variable_new(
long $variable_type,
string $name,
string $expr,
?string $ignoreexpr,
?string $reset_on_break_name = null,
?bool $precalculate = false):
OpenCReport\Variable;
A precalculated variable's value (or set of values) is calculated during the precalculation phase of report execution. When the report is being rendered, the precalculated values are used. This allows using an end value in a header, e.g. a report header may contain a summary of bottom line values. Similarly, break headers may show values that would otherwise be shown only in break footer sections for variables that are reset on a break.
Create a new custom variable of the specified name,
with total control over the base expression,
intermediary expression(s) and the result expression.
Optionally a break name (see Report breaks)
may be specified, where, upon a break change,
the variable is reset. See Report variables.
For class methods of
OpenCReport\Variable,
see Section 12.14.
public final
OpenCReport\Report::variable_new_full(
long $result_type,
string $name,
?string $baseexpr = null,
?string $ignoreexpr,
?string $intermedexpr = null,
?string $intermed2expr = null,
?string $resultexpr = null,
?string $reset_on_break_name = null,
?bool $precalculate = false):
OpenCReport\Variable;
Get the first variable object in the
chain of variables of the report.
The object is marked internally
as an iterator, so
OpenCReport\Variable::get_next()
may be used on it.
public final
OpenCReport\Report::variable_get_first():
?OpenCReport\Variable;
Parse and expression for the report.
If the expression fails to parse, the
method returns NULL
and the error is found in
OpenCReport\Report::expr_parse().
public final
OpenCReport\Report::expr_parse(
string $expr_string):
?OpenCReport\Expr;
The main difference between
OpenCReport::expr_parse()
(see Section 12.4.4.1)
and this method is that the former may not
reference a report variable identifier.
Since the expression for the former method is not
associated with a report, report variable identifiers
in the expression may not be resolved.
The same applies to any function that is related
to report internal details, e.g. the
brrownum() function
(see Break row number function:
the expression is not associated with a report with
breaks, the break name will not be found.
public final OpenCReport\Report::expr_error(): ?string;
Resolve all variables of the report. This method may be useful to implement a custom report executor. The equivalent C function is used internally. This method is used by unit tests.
public final OpenCReport\Report::resolve_variables(): void;
This method may be useful to implement a custom report executor. The equivalent C function is used internally. This method is used by unit tests.
public final OpenCReport\Report::evaluate_variables(): void;
Create a new report break. A break
is the basis for grouping data.
See Report breaks.
For the class methods of
OpenCReport\ReportBreak,
see Section 12.15.
public final
OpenCReport\Report::break_new(
?string $name):
OpenCReport\ReportBreak;
Get a previously created break
using its name. The object that's created
this way is not marked
as an iterator, so
OpenCReport\ReportBreak::get_next()
may not be used on it.
public final
OpenCReport\Report::break_get(
string $break_name):
OpenCReport\ReportBreak;
Get the first break object in the
chain of breaks of the report.
The object is marked internally
as an iterator, so
OpenCReport\ReportBreak::get_next()
may be used on it.
public final
OpenCReport\Report::break_get_first():
?OpenCReport\ReportBreak;
Resolve all breaks of the report. It may be useful to create a custom report executor. The equivalent C function is used internally. Used by unit tests.
public final OpenCReport\Report::resolve_breaks(): void;
Get the current row number of the report's main query. Used by unit tests.
public final OpenCReport\Report::get_query_rownum(): long;
Add a "report start" callback to the report. The callback is called when the report starts during report execution.
public final
OpenCReport\Report::add_start_cb(
string $callback): void;
The callback function interface must follow this:
function my_callback(OpenCReport $o, OpenCReport\Report $r): void;
Add a "report done" callback to the report. The callback is called when the report is done during report execution.
public final
OpenCReport\Report::add_done_cb(
string $callback): void;
The callback function interface must follow this:
function my_callback(OpenCReport $o, OpenCReport\Report $r): void;
Add a "new row" callback to the report. The callback is called for every data row for the report during report execution.
public final
OpenCReport\Report::add_new_row_cb(
string $callback): void;
The callback function interface must follow this:
function my_callback(OpenCReport $o, OpenCReport\Report $r): void;
Add an "iteration done" callback to the report. The callback is called after every iteration for the report during report execution.
public final
OpenCReport\Report::add_iteration_cb(
string $callback): void;
The callback function interface must follow this:
function my_callback(OpenCReport $o, OpenCReport\Report $r): void;
Add a "precalculation done" callback to the report. The callback is called after precalculation is done for the report during report execution.
public final
OpenCReport\Report::add_precalculation_done_cb(
string $callback): void;
The callback function interface must follow this:
function my_callback(OpenCReport $o, OpenCReport\Report $r): void;
Check whether the main object's internal C representation is the same as the passed-in object's internal representation.
public final
OpenCReport\Report::equals(
OpenCReport\Report $report):
bool;
Set the report's main query to
the passed-in OpenCReport\Query.
public final
OpenCReport\Report::set_main_query(
OpenCReport\Query $query): void;
Set the report's main query using the query name.
public final
OpenCReport\Report::set_main_query_by_name(
string $query_name): void;
Set the report's suppression. The expression must evaluate too a numeric value. It's zero or non-zero value will decide whether the report is suppressed, i.e. not calculated and not rendered in the output.
public final
OpenCReport\Report::public final set_suppress(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::public final get_suppress():
?OpenCReport\Expr;
Set the number of iterations for the report. The report will be calculated and rendered this many times. Default is 1.
public final
OpenCReport\Report::set_iterations(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::get_iterations():
?OpenCReport\Expr;
Set the font name for the report. The report font name will be used for any child elements that don't specify the font name themselves.
public final
OpenCReport\Report::set_font_name(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::get_font_name():
?OpenCReport\Expr;
Set the font size for the report. The report font size will be used for any child elements that don't specify the font size themselves.
public final
OpenCReport\Report::set_font_size(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::get_font_size():
?OpenCReport\Expr;
Set the report height. During report execution, the report height is calculated for rendering. Height of lines that would be rendered are added. New lines that would exceed the report height are not rendered. The data shown in rendered lines are identical in both cased, whether or not the report height is set. Default is unset, i.e. every line is rendered and the number of lines determine the report height,
public final
OpenCReport\Report::set_height(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::get_height():
?OpenCReport\Expr;
Set the report's field header priority. See Report field header priority attribute for explanation.
public final
OpenCReport\Report::set_fieldheader_priority(
?string $expr_string = null):
?OpenCReport\Expr;
public final
OpenCReport\Report::get_fieldheader_priority():
?OpenCReport\Expr;
Get the output sections of the report.
See NoData node,
Report header,
Report footer and
Detail node.
For class methods of ,
see Section 12.16.
public final OpenCReport\Report::nodata(): OpenCReport\Output; public final OpenCReport\Report::header(): OpenCReport\Output; public final OpenCReport\Report::footer(): OpenCReport\Output; public final OpenCReport\Report::field_header(): OpenCReport\Output; public final OpenCReport\Report::field_details(): OpenCReport\Output;