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)
Multi Column Report
m.motwakel@gmail.com
<p>Hello All,</p>
<p> </p>
<p>I need to build a birt report such that the report has two columns and when the first column is full the data go to the second column,</p>
<p> </p>
<p>Thanks,</p>
Find more posts tagged with
Comments
sakthi
<div>Attached is an example, to implement the multi column (newspaper format) layout for the data. Check out for the filter property in each tables for the condition. </div>
<div> </div>
<div>Create a grid with two columns and add table in both columns which are exactly same. In the table properties set the filter by checking for the number of the rows to be displayed. The filter condition for the table is like </div>
<div> </div>
<div>
<pre class="_prettyXprint _lang-js">
var returnValue = 1;
if(vars["vColOneCount"] === 1)
{
returnValue = 1;
if((row.__rownum + 1) % vars["vPageRowSize"] == 0){
vars["vColOneCount"] = 2;
}
}
else
{
returnValue = 2;
if((row.__rownum + 1) % vars["vPageRowSize"] == 0){
vars["vColOneCount"] = 1;
}
}
returnValue;
</pre>
</div>
<p> </p>
<div> </div>
<div>and it be should be equal to 1 for the table on the left side table of the grid and it is equal to 2 on the left side table of the grid. Create two BIRT variables (tableOneCount, tableTwoCount), assign default value as 1 and used them on respective table filter condition.</div>
<div> </div>
<div>You can implement your own logic as well.</div>