Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  BIRT Report Unwanted Page Break Issue for PDF

    Posted Wed August 21, 2024 01:03 PM

    Hi Everyone,

    I am facing unwanted Page Issue which exporting my BIRT Report to PDF Format.

    My BIRT report has one main Table. This Page Break is happening between 2 Table Detail Row of my BIRT Report.

    The first Table Detail Row contains a Table with a header and table detail which refers to Dataset 1.

    The second Table Detail Row contains another Table with 3 table group headers and 2 Table Detail Rows.

    Whenever I generate the Report in Browser or Word Version, there is no problem. However when I try to export it into PDF there is a unwanted page break between these two Detail Rows of the main Table.

    I tried to do several permutation combination with the page break of the Tables in each Table Detail Rows. However the page break issue still persists.

    Request to please help me.

    Best Regards,

    Ayan



    ------------------------------
    AYAN DE
    ------------------------------


  • 2.  RE: BIRT Report Unwanted Page Break Issue for PDF

    Posted Thu August 22, 2024 11:33 AM

    Hi Ayan, put this code on beforeRender function on birth report

    // Remove page break intervals from PDF output
    //if ( (reportContext.getParameterValue("usepagebreaks") == "false")|| reportContext.getOutputFormat() == "pdf" ) {
    if ( reportContext.getOutputFormat() == "pdf" ) {
        // Give each table in the report a name, and add the names to the list below, e.g. ["mainTable", "childTable1"]
        var tableListing = ["Multi Asset-Location-CI","Specification","Planned Labor","Planned Materials","Planned Services",
                            "Planned Tools","Descripcion del Trabajo","Task IDs","Actual Labor","Actual Materials",
                            "Actual Services","Actual Tools","Related Records (WO)","Related Records (Ticket)","Log",
                            "SLA","Descripcion del Trabajo1"];
        for each(var tableName in tableListing) {
            var table = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement(tableName)
            if (table != null)
            {
                table.setProperty("pageBreakInterval", 0);
            }
        }
    }

    Regards



    ------------------------------
    Pablo Condoleo
    ------------------------------