Skip to content

No support for conditional page breaks to print multiple fields on separate pages if they don’t fit together #296

@jayeshsony

Description

@jayeshsony

I need to display two text fields (for example, Note and Terms & Conditions) in a report with the following behavior:

  • If both fields fit on the current page, print them together on that page.
  • If they do not both fit on the current page, print Note starting on a new page, and print Terms & Conditions starting on a separate new page (i.e., each on its own page).

Currently, JasperReports lacks a feature or property to detect whether multiple fields fit together on the current page and then conditionally insert page breaks between those fields to separate them across pages.

Properties like splitType or isStartNewPage work only on bands or single elements and cannot dynamically insert page breaks between multiple elements based on their combined size and page fit.

As a result, it’s difficult or impossible to achieve this conditional behavior without complex manual workarounds or combining fields (which doesn’t allow splitting across pages).

Expected behavior:

A built-in feature or improved layout control that allows checking if multiple fields fit on the current page and, if not, inserting page breaks between those fields so that they can start on separate pages as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions