Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic Columns in a table
JohannJ
<p>Hello<br><br>
I am running Eclipse Mars.1 with BIRT 4.5.0.<br><br>
I need a table with a dynamic number of columns.<br>
The table should look like the following table<br><br><span style="font-family:'courier new', courier, monospace;"> Plans used Element(1) Element(2) ...... Element(6)<br>
<br>
Plan 1 no - - 1 10 2 20<br>
Plan 2 yes 1 10 - </span><span style="font-family:'courier new', courier, monospace;"> - 3 30<br>
...<br>
Plan n no 3 30 3 30 3 30<br>
<br>
<br>
Plans used Element(7) Element(8) ...... Element(n)<br>
<br>
Plan 1 no - - 1 10 2 20<br>
Plan 2 yes 1 10 - - 3 30<br>
...<br>
Plan n no 3 30 3 30 3 30</span></p>
<p>
Each row represents one plan (Plan 1 .. n) and every plan has a dynamic number of elements (Element (1) .. (n)). For every element in a plan we will show some information (e.g. "1 10").<br>
If the number of columns exceeds the page width the table should continue with a new table.<br>
The number of Elements and the number of Plans are known at runtime (SQL statement).<br><br>
Is there a way to get this solution?<br><br>
Kind regards,<br>
Johann</p>
Find more posts tagged with
Comments
Matthew L.
<p>This is possible however it will require some custom coding to accomplish this.</p>
<p>Take a look at the following example for details on creating a dynamic table:</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/24254-creating-column-dynamically/?p=132987'>http://developer.actuate.com/community/forum/index.php?/topic/24254-creating-column-dynamically/?p=132987</a></p>
;
<p> </p>
<p>Additional effort will be needed to get the Master Page width and calculate the max number of columns in your table.</p>
<p>Then loop the dynamic table creation with the remaining data that has not yet been processed on a previous table.</p>
JohannJ
<p>Hey Matthew<br><br>
thanks for your help, the example is very helpful.<br><br>
In the example a DataSet "odaDataSet.setQueryText( "SELECT * ...) is used. In my case I need<br>
a PL/SQL function to get a result like "Plan 1 no - - 1 10 2 20". Is it also possible to</p>
<p>use a PL/SQL function with parameters ?<br><br>
And how can i set the Header for the Elements (the name of the element) ?<br><br>
Thanks,<br>
Johann</p>