Page break automation

birtENG
edited February 11, 2022 in Analytics #1
Hello,


I want to automate a PageBreak in order to have a Pagebreak in a specified position if the number of pages of the report is over than 1 page ?

Comments

  • Mad1s0n
    edited December 31, 1969 #2
    You can specify page breaks in scripts. Have a look at this <a class='bbc_url' href='http://www.birt-exchange.org/org/devshare/designing-birt-reports/1275-group-conditional-page-break/'>DevShare post</a>.
  • birtENG
    edited December 31, 1969 #3
    Ok.it doesn't work. I think something's missing


    if( this.getRowData().getColumnValue("ORDERNUMBER") == 10104 ){
    this.getStyle().pageBreakBefore = "always";
    }
    and I don't see what does the value 10104 mean ??
  • Mad1s0n
    edited September 17, 2012 #4
    Where did you put the part: <pre class='_prettyXprint _lang-auto _linenums:0'>this.getStyle().pageBreakBefore = "always"</pre>
    This is what's relevant in the example. The rest is only the condition used for the example.
  • birtENG
    edited December 31, 1969 #5
    I have a table that contains some rows.the goal is to put a pagebreak if the whole document is longer than 1 page.it depends on number of rows.
    I have to return the number of rows.once this is done, I have to test on that number of rows in order to put a page break.
    How can I return the number of rows?I've made : count(datasetrow["variable"]) but it doesn't work.