Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Change Table margin dynamically based on Page number
Migrateduser
<p>Hi,</p>
<p> </p>
<p>I want to change the top margin of a table dynamically based on the pageNumber. If it is the first page, the <strong>table.marginTop</strong> should be <strong>0pt</strong> (just under a preceding grid), else on a new page, it should be 10pt.</p>
<p>I have found the method, but just don't know what is the type of pageNumber, so that I can compare it with integer(1,2.3). I have placed the following script in <em>onPrepare()</em> function, but it is picking value from <strong>else</strong> bracket</p>
<div>
<pre class="_prettyXprint">
if(pageNumber == 1){
this.getStyle().marginTop="0pt";
}
else{
this.getStyle().marginTop="10pt";
}</pre>
<p>When I try <em>pageNumber.compareTo(1)</em>, I get an error, "<b><span>Cannot find function compareTo in object 0". </span></b></p>
<p><span>I suspect pageNumber gets value after the page rendering.</span></p>
</div>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet