Home Analytics DevShare
The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Message "CONTINUES NEXT PAGE" automatically

smgomessmgomes Member
edited November 1, 2013 in DevShare
Hi,<br />
this tip purpose as controlling the message: "Continued on next page" in documents like Invoice.<br />
In my example I have a DATASET (Name: Lines) which is a collection in Java that don't know how many rows will iterate the document, to better control the message do as follows:<br />
Method : DATASET > Script > open
//get the collection size (number of lines number of lines in the document)
_collectionSize = new Integer(document.getLines().size());reportContext.setGlobalVariable("_collectionSize",_collectionSize);
<br />
My table's lines has this DATASET (Lines) as binding:<br />
TableName (ElementName): documentLines<br />
<br />
TableLines.png<br />
Method : Table > Script > onPrepare
_breakPage = new Integer(reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("documentLines").getProperty("pageBreakInterval"));
reportContext.setGlobalVariable("_breakPage",_breakPage);
<br />
In the last detail row of the table, which indicates the message add the following script at Visibility Property:
var _breakPage = reportContext.getGlobalVariable("_breakPage");
var _collectionSize = reportContext.getGlobalVariable("_collectionSize");
if ( (row&#91;"currentLine"] == _breakPage) &amp;&amp; (row&#91;"currentLine"] &lt; _collectionSize) ){
_breakPage = parseInt(_breakPage)+parseInt(reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("documentLines").getProperty("pageBreakInterval")); reportContext.setGlobalVariable("_breakPage",_breakPage ); 
false;
}else{ true;}
<br />
Whatever the value of the Page Break in table, the message will appear automatically!<br />
I hope I helped because I had this problem!<br />
Best Regards,<br />
Sérgio Gomes
www.projectocolibri.com
Sign In or Register to comment.