Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Adding Integer to pageNumber variable
mukesh
<p>Hello Everyone,</p>
<p>i am creating a report in birt version 4.3.2 wherein i need to start page numbering from second page when a particular condition is true, if not the page number will start from page one only.</p>
<p> </p>
<p>Initially i thought i will be able to add integer to pageNumber variable like <value-of>pageNumber+1</value-of> but its not working.please suggest or share any other work around.</p>
<p> </p>
<p>Thanks ins advance.</p>
Find more posts tagged with
Comments
micajblock
<p>In the attached simple example I am adding based on parameter. The script is on the text item in the footer of the master page.</p>
<pre class="_prettyXprint">
this.text = "Page " + (pageNumber + params["Add to Page Number"].value)</pre>
mukesh
<p>Thanks Mica for sharing the code,but i observed that after adding the integer value the pageNumber is not getting incremented.</p>
<p>yes page numbers are starting from number 2 for default value of variable i.e. 1 but on the second page it shoud show Page 3 but its showing Page2 only and on every page.the pageNumber is not getting incremented.</p>
<p> </p>
<p>Please have a look,the file which you have share also shows the same result.</p>
<p> </p>
<p>Thanks</p>
micajblock
<p>Apologies. The code should be in the onRender event, not onCreate. Attached fixed version,</p>
mukesh
<p>Thank you very much Mica.</p>
<p>its working fine now and as per the requirement.</p>
<p> </p>
<p>once again thank you very much,just to share I am new to Birt and was little bit afraid but i must say this kind of responsive support will definitely help and encourage me and many more who are new to birt.</p>
<p> </p>
<p>Thanks have a good day.</p>