Home
Analytics
First page without number, next - starts from 1
tekiteki
Hello everyone! Does anyone know how to change page numbering of the report this way: first page must be without number, the second page starts from 1 (so the whole numbering thing will be: "blank",1,2,3,....).
I searched for the answer everywhere with no positive result. I tried to use two master pages: one - for the first page - without numeration, second - for the rest pages - with numeration. The result was - "blank",2,3,4,5,...
I tried Page variables, global variables + scripts, but i'm not that smart and after all my efforts all I could get - was the equal number for all the pages o_O.
I even started to think, that it might be impossible...
I'd hugely appreciate any help on this matter! I'm using Birt 3.7.2.
Find more posts tagged with
Comments
kclark
Hi tekiteki, can you post the rptdesign with the results on blank,2,3,4... with the sample db? I think you've almost got it, you may just need to subtract one on each page so I'd like to see the script you used.
tekiteki
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="112417" data-time="1355420587" data-date="13 December 2012 - 10:43 AM"><p>
Hi tekiteki, can you post the rptdesign with the results on blank,2,3,4... with the sample db? I think you've almost got it, you may just need to subtract one on each page so I'd like to see the script you used.<br /></p></blockquote>
<br />
Thank you for your reply! <br />
I wish it was that easy. Using some tricks (and i really don't know, why it worked) I was able to get this last night: "blank",1,2,2,2,.... o_o (I used 2 masterpages, 1 page variable, and this scripts:<br />
- onCreate event of footer of Master page with numbers:<br />
reportContext.setPageVariable("pnum","1");<br />
- onPageEnd (or onPageStart, doesn't matter) of the Master page with numbers:<br />
if (vars["pnum"]="1") {<br />
reportContext.setPageVariable("pnum","2")<br />
}<br />
else if (vars["pnum"]="2") {<br />
reportContext.setPageVariable("pnum","3")<br />
}<br />
// "else if" - doesn't work<br />
<br />
I'm attaching 2 files, 1st - with simple using of 2 master pages and pageNumber in the footer which gives me "blank",2,3,4,...; 2nd - which gives me "blank",1,2,2,2,....