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)
How to use carryover values from a table
germobirt
<p>Hi, using Birt 4.3.1 I want to figure out ways to use carryover values from tables over multiple pages.</p>
<p> </p>
<p>How and where can I use aggregated values (sum/avg) if a table stretches over multiple pages.</p>
<p> </p>
<p>1. Can I show such values in a last line of the table before the page break?</p>
<p>2. Can I show such values in a first line of the table after the page break?</p>
<p>3. Can I show such values in a row(cell) under/outside the table before the page break?</p>
<p>4. Can I show such values in the footer/header area of the masterpage?</p>
<p> </p>
<p>Best regards</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>I have attached an example that shows how you can display the carryover value of a running sum on each page of a report. I have used two techniques: 1) display a page variable in the header and footer of the master page; 2) display a persistent global variable in a label inside the detail row of the table. The use of two different techniques is due to the way events are generated in BIRT. </p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
germobirt
<p>Hi,</p>
<p> </p>
<p>thanks it helped a lot, but it seems to me that it's propably not possible to show the carryover values in the footer of the current page (where the current running sum is calculated, or?</p>
<p> </p>
<p>The content of a page variable is obviously read on every OnRender() event when a new footer is created.</p>
<p>And that is before any running sums are calculated.</p>
<p> </p>
<p>Can you confirm that?</p>
<p> </p>
<p>best regards</p>
pricher
<p>Hi,</p>
<p> </p>
<p>To show the carryover value in the footer of the current page:</p>
<p> </p>
<p>1) Create a new page variable, carryOverToPrintFooter;</p>
<p> </p>
<p>2) Set the value of carryOverToPrintFooter in the onPageBreak method of the table:</p>
<p><span style="font-size:12px;"><span style="font-family:'courier new', courier, monospace;"> reportContext.setPageVariable("carryOverToPrintFooter", reportContext.getPersistentGlobalVariable("carryOver"));</span></span></p>
<div> </div>
<p>3) Display carryOverToPrintFooter in the footer area of the master page</p>
<p> </p>
<p>I have attached a modified sample report.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>
germobirt
<p>Thanks, but I got this already.</p>
<p> </p>
<p>What I would like to see in your example is the running sales values</p>
<p><strong>3.531.083,93</strong> in the <strong>footer of the first page</strong></p>
<p><strong>7.029.476,52</strong> in the <strong>footer of the 2nd page</strong></p>
<p> </p>
<p>Is that possible?</p>
<p> </p>
<p>In your example the running sales value of the first page is displayed(carried over) in the footer of the 2nd page.</p>
<p> </p>
<p>best regards</p>
pricher
<p>The example I just sent you does that already!</p>
<p> </p>
<p>