Birt Designer - Insert Table Elements dynamically using Event Handlers Scripting

HeythemB
edited February 11, 2022 in Analytics #1
<p>Hello,</p>
<p> </p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">i'm using Eclipse Birt Designer v4.4.1,</p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">I have a dataset that returns a certain number of rows.</p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">I would like to insert dynamically Table Elements based on the number of returned rows. (If number of rows = 6, then add 6 table elements (the same table structure).</p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">I found out recently that this could be done using Javascript (Or Java) Event Handlers :</p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;"><a data-ipb='nomediaparse' href='http://eclipse.org/birt/documentation/integrating/scripting.php'>http://eclipse.org/birt/documentation/integrating/scripting.php</a></p&gt;
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">(probably the onFetch event, the BeforeFactory or the onCreate Event)</p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">Does anyone know how could this be done or provide a similar example for adding an element dynamically to a Birt Report using scripts. </p>
<p style="margin:0px 0px 1em;font-size:14px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;font-style:normal;font-weight:normal;text-align:left;">Thanks.</p>

Comments