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)
Resetting Page Numbering
Still
<p>Hello,</p>
<p> </p>
<p>I'm struggling since days because I can't find a solution to reset my page numbering. I'm trying to get something who looks like this :</p>
<p> </p>
<p>(First Part)</p>
<p>P 1/3</p>
<p>P 2/3</p>
<p>P 3/3</p>
<p> </p>
<p>(Second Part)</p>
<p>P 1/2</p>
<p>P 2/2</p>
<p> </p>
<p>I tried differents ways to achieve it already but in vain.</p>
<p> </p>
<p>Here's my lastest solution I tried :</p>
<p> </p>
<p>I have 2 tables, each of these got his own master page. I'm trying to reset the page numbering in master pages. I have a working solution for the current page (Page Number). However, I haven't found any solution for the Total Page.</p>
<p> </p>
<p>I either get the Total Page but then I can't refresh the previous rendered pages, either I can't have the right number of Total Page.</p>
<p> </p>
<p>I don't know how to handle it. That's why I'm coming to you.</p>
<p>If you have any idea of how I can get through this, I'd be grateful toward you.</p>
<p> </p>
<p><strong>The report will have to run with Maximo (7.5.0.6 - BIRT 3.7.1). I've to run it as PDF.</strong></p>
<p> </p>
<p><em><span style="font-size:12px;">You can find a report of my problem working with the sample database attached to this post.</span></em></p>
Find more posts tagged with
Comments
micajblock
<p>Take a look at this DevShare. It is renumbering based on groups, but same technique can be used in your case also.</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1064-new-group-page-numbering/'>http://developer.actuate.com/community/forum/index.php?/files/file/1064-new-group-page-numbering/</a></p>
;
Matthew L.
<p>Still,</p>
<p> </p>
<p>Here is my quick modification to your design file based on code I used for page numbering based on groups.</p>
<p>I did however remove the second masterpage on your design, though I'm sure you can adjust the code to implement it back if needed.</p>
<p> </p>
<p>This modification will output page numbers per table, along with total number of tables it loops through, and total number of report pages on the masterpage's header</p>
<p> </p>
<p> </p>
<p> </p>
Still
<p>Thanks you both for your quick answers. Unfortunately, when I run the GroupPageNumber report, I get weird values such as follow :</p>
<ol><li>Page 0 of NULL</li>
<li>Page 0 of NULL</li>
<li>Page 1 of 1</li>
<li>Page 2 of 2</li>
<li>Page 2 of 2</li>
<li>Page 2 of 2</li>
<li>Page 3 of 3</li>
<li>...</li>
</ol><p>As for the ML's report, I get quite same weird results :</p>
<ol><li>(Page null of null) [Number of groups null] [Total pages null] (x2)</li>
<li>(Page null of null) [Number of groups 1] [Total pages 1] (x4)</li>
</ol><p> </p>
<p>I'm beginning to think that my Birt environment is broken. Moreover, I hadn't any problem to get the correct value of pageNumber when I was calling it until now. pageNumber variable gives me the right value until the call of the second master page. <strong>The value stays to what it was at the last value of the first master page.</strong></p>
<p> </p>
<p> Yesterday Today</p>
<p> (Part 1) (Part 1)</p>
<ul><li>P 1/5 P 1/5</li>
<li>P 2/5 P 2/5 </li>
<li>P 3/5 P 3/5</li>
</ul><p> (Part 2) (Part 2)</p>
<ul><li>P 1/5 P 1/5</li>
<li>P 2/5 P 1/5</li>
</ul><p> </p>
<p>I followed this install process provided by IBM : <a data-ipb='nomediaparse' href='
http://www-01.ibm.com/support/docview.wss?uid=swg21605970&aid=1'>http://www-01.ibm.com/support/docview.wss?uid=swg21605970&aid=1</a></p>
;
<p>I could have did something wrong here because I noticed some imprecisions and contradictions during a second reading and more particularly around the part when it asks to copy/paste classes and others files to specific folders.</p>
<p> </p>
<p>If you have any idea of what's going on. It's a thorn in the side for me.</p>
<p>(Also, I forgot to mention that I've to run the report as PDF)</p>
<p> </p>
<p><span style="font-size:10px;">Once again, I would like to thanks you mblock and matthew. I really appreciate it.</span></p>
micajblock
<p>Ah, so this is Maximo. They do a lot of strange things. In the designer does it work if you run the report in the web viewer and then export to PDF (2 steps, do NOT use View as PDF in the designer).</p>
Still
<p>Yup. This way, it works like a charm. Thanks a lot !</p>
<p>But, my big problem is the report has to be run as PDF from Maximo (once it will be deployed).</p>
<p> </p>
<p>As you have more experience than me (I have no doubt on it), do you know if there is a workaround ? Do I need to customize some classes or whatever ?</p>
<p> </p>
<p>Thanks in advance, I stay tuned.</p>
micajblock
<p>OK, so the reason that viewing the report first works is because the code that does the renumbering requires the generation and rendering to be separate tasks. The variables get created at generation time and then gets used at render time. In the OS BIRT designer 'View as PDF' uses a BIRT Task called runandrender (which runs both in a single task) hence it does not work. If I am not mistaken Maximo when generating PDF uses the same runandrender task (which is actually bad practice). Also if I am not mistaken if you view the report first in Maximo and then export to PDF, Maximo changed the behavior and it still uses the runandrender task. <span style="font-size:14.4444446563721px;">You will need to test in Maximo to verify.</span><span style="font-size:14px;"> If this is indeed the case you have two options:</span></p>
<ol><li><span style="font-size:14px;">Ask IBM to fix </span>their<span style="font-size:14px;"> code (good luck with that).</span></li>
<li><span style="font-size:14px;">Purchase commercial BIRT server and use ERI from Maximo to run report off a BIRT iHub,</span></li>
</ol>
Matthew L.
<p>I agree with mblock about commercial BIRT server, as the RunAndRender task complicates this solution.</p>
<p>However, I managed to find this article on how to separate the run and render tasks.</p>
<p>Although I'm not sure if this would work for a Maximo environment, if it does, then this could be a workaround to get the page numbers for the render task.</p>
<p><a data-ipb='nomediaparse' href='
http://wiki.eclipse.org/Separate_Run_and_Render_(BIRT)_2.1'>http://wiki.eclipse.org/Separate_Run_and_Render_(BIRT)_2.1</a></p>
;
micajblock
<p>I do not think you can access the Maximo source code to change this behavior. </p>
Archana Karnik
<p>Hi,</p>
<p> </p>
<p>I am developing a report in BIRT 4.3.2.</p>
<p>I have one disclaimer at the beginning of the report (page 1). The visibility of this page is based on the condition. </p>
<p>If the flag is true then show disclaimer else directly data page.</p>
<p>Whenever the disclaimer is shown, that page should not be counted in pageNumber or in totalPage.</p>
<p>and the page numbering should start from data page with 1.</p>
<p>(i have 2 different Master Pages for disclaimer and data)</p>
<p> </p>
<p>I tried subtracting 1 from variable pageNumber based on the flag condition but it is not working.</p>
<p> </p>
<p>Please guide.</p>
<p> </p>
<p>Thanks in advance,</p>
<p>Archana</p>
micajblock
<p>I answered your other post.</p>