12.10. The OpenCReport\Part class #

12.10.1. Get the next report part
12.10.2. Create a new report part row
12.10.3. Get the first report part row
12.10.4. Add iteration callback for the part
12.10.5. Check whether two parts are identical
12.10.6. Set or get number of part iterations
12.10.7. Set or get part font name
12.10.8. Set or get part font size
12.10.9. Set or get paper type
12.10.10. Set or get part orientation
12.10.11. Set or get part top margin
12.10.12. Set or get part bottom margin
12.10.13. Set or get part left margin
12.10.14. Set or get part right margin
12.10.15. Set or get part suppression
12.10.16. Set or get suppression of the page header on the first page
12.10.17. Get the part's page header
12.10.18. Set the report object for the part's page header
12.10.19. Get the part's page footer
12.10.20. Set the report object for the part's page footer

class OpenCReport\Part {
    public final get_next():
                     ?OpenCReport\Part;

    public final row_new():
                     OpenCReport\Row;

    public final row_get_first():
                     ?OpenCReport\Row;

    public final add_iteration_cb(
                     string $callback): void;

    public final equals(
                     OpenCReport\Part $part): bool;

    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_paper(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_paper():
                     ?OpenCReport\Expr;

    public final set_orientation(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_orientation():
                     ?OpenCReport\Expr;

    public final set_top_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_top_margin():
                     ?OpenCReport\Expr;

    public final set_bottom_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_bottom_margin():
                     ?OpenCReport\Expr;

    public final set_left_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_left_margin():
                     ?OpenCReport\Expr;

    public final set_right_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_right_margin():
                     ?OpenCReport\Expr;

    public final set_suppress(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_suppress():
                     ?OpenCReport\Expr;

    public final set_suppress_pageheader_firstpage(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

    public final get_suppress_pageheader_firstpage():
                     ?OpenCReport\Expr;

    public final page_header():
                     ?OpenCReport\Output;

    public final page_header_set_report(
                     OpenCReport\Report $report):
                     void;

    public final page_footer():
                     ?OpenCReport\Output;

    public final page_footer_set_report(
                     OpenCReport\Report $report):
                     void;
}

12.10.1. Get the next report part #

Get the next object in the chain of report parts. This method may only be used on an object created with OpenCReport::part_get_first(), i.e. one that was internally marked as an iterator object.

public final
OpenCReport\Part::get_next():
                     ?OpenCReport\Part;

12.10.2. Create a new report part row #

For class methods of OpenCReport\Row, see Section 12.11

public final
OpenCReport\Part::row_new():
                     OpenCReport\Row;

12.10.3. Get the first report part row #

Get the first part row from the part. The object is marked internally as an iterator. For class methods of OpenCReport\Row, see Section 12.11

public final
OpenCReport\Part::row_get_first():
                     ?OpenCReport\Row;

12.10.4. Add iteration callback for the part #

Add an "iteration done" event callback for the part object.

public final
OpenCReport\Part::add_iteration_cb(
                     string $callback): void;

12.10.5. Check whether two parts are identical #

Check whether two part objects refer to the same internal part structure of the report. Used by unit tests.

public final
OpenCReport\Part::equals(
                     OpenCReport\Part $part): bool;

12.10.6. Set or get number of part iterations #

Set the number of iterations for the part. The expression must evaluate to a numeric (integer) value. The part and all of its subsections will be calculated and rendered this many times. Default is 1.

public final
OpenCReport\Part::set_iterations(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_iterations():
                     ?OpenCReport\Expr;

12.10.7. Set or get part font name #

public final
OpenCReport\Part::set_font_name(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_font_name():
                     ?OpenCReport\Expr;

12.10.8. Set or get part font size #

public final
OpenCReport\Part::set_font_size(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_font_size():
                     ?OpenCReport\Expr;

12.10.9. Set or get paper type #

public final
OpenCReport\Part::set_paper(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_paper():
                     ?OpenCReport\Expr;

12.10.10. Set or get part orientation #

The expression must evaluate to a string value. The possible values are portrait and landscape. Default is portrait.

public final
OpenCReport\Part::set_orientation(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_orientation():
                     ?OpenCReport\Expr;

12.10.11. Set or get part top margin #

public final
OpenCReport\Part::set_top_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_top_margin():
                     ?OpenCReport\Expr;

12.10.12. Set or get part bottom margin #

public final
OpenCReport\Part::set_bottom_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_bottom_margin():
                     ?OpenCReport\Expr;

12.10.13. Set or get part left margin #

public final
OpenCReport\Part::set_left_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_left_margin():
                     ?OpenCReport\Expr;

12.10.14. Set or get part right margin #

public final
OpenCReport\Part::set_right_margin(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_right_margin():
                     ?OpenCReport\Expr;

12.10.15. Set or get part suppression #

Set whether the part is suppressed, i.e. all its subsections are omitted from calculating and rendering. Default is false.

public final
OpenCReport\Part::set_suppress(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::get_suppress():
                     ?OpenCReport\Expr;

12.10.16. Set or get suppression of the page header on the first page #

Set whether the page header of the part is suppressed on the first page. The expression must evaluate to a numeric value, which is treated as a boolean (i.e. 0 or non-0). Default is false.

public final
OpenCReport\Part::set_suppress_pageheader_firstpage(
                     ?string $expr_string = null):
                     ?OpenCReport\Expr;

public final
OpenCReport\Part::set_suppress_pageheader_firstpage():
                     ?OpenCReport\Expr;

12.10.17. Get the part's page header #

Get the part's page header <Output> section. See Section 12.16 and Output node.

public final
OpenCReport\Part::page_header():
                     ?OpenCReport\Output;

12.10.18. Set the report object for the part's page header #

Set the report object for the part's page header. This will add the internal association between the part's page header and the report, and expressions in the part page header may reference report query column identifiers and report user variables. Therefore it is only recommended for single-part, single-report reports.

public final
OpenCReport\Part::page_header_set_report(
                     OpenCReport\Report $report):
                     void;

12.10.19. Get the part's page footer #

Get the part's page footer <Output> section. See Section 12.16 and Output node.

public final
OpenCReport\Part::page_footer():
                     ?OpenCReport\Output;

12.10.20. Set the report object for the part's page footer #

Set the report object for the part's page footer. This will add the internal association between the part's page footer and the report, and expressions in the part page footer may reference report query column identifiers and report user variables. Therefore it is only recommended for single-part, single-report reports.

public final
OpenCReport\Part::page_footer_set_report(
                     OpenCReport\Report $report):
                     void;