Conditional PageBreaks in Docx

  • Is there an in-built Possibility to only do PageBreaks on certain conditions with the Docx Recipe or would I need to build my own Helper Method around this?

    What I currently have is something that looks simplified like this:

    {{#each objects}}
        {{template of object}}

    Since this at the End of the Report the last Page is just an empty Page which is not nice.

  • Try this:

    {#each objects}}
    {{#if @last}}{{else}}{{docxPageBreak}}{{/if}}{{/each}

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.