Detail row onCreate event of a table

Birt_Wiz
edited February 11, 2022 in Analytics #1
<p>Hi,</p>
<p> </p>
<p>I am using a table with a data set binding. On the onCreate event of a detail row, I am calculating the new fields using the dataset fields and trying to display them on the report. When I run the report on designer, the first row is coming blank and new field values showing correctly from second row on-wards. And at the end, last row is missing. I am thinking onCreate event of data row and the onCreate event of individual data elements on that row are triggered at same time, so that is causing the first row to display as blank. Please let me know if there is any approach to fix this? Thank you in advance.</p>

Comments

  • Zorawar
    edited July 9, 2017 #2
    <p>It is easier to define calculated values in the dataset editor. They are known as Computed Columns.</p>
    <p>The attached image shows how to set it up for an example.</p>
    <p> </p>
    <p>Hopefully that is what you needed.</p>
  • <p>Thank you for the response. I cannot use the computed columns at data set level because the source fields that I am using to calculate new values are also calculated fields and are available only at the row level. Thanks.</p>
  • <p>Have a look at this, <a data-ipb='nomediaparse' href='http://www.eclipse.org/birt/documentation/integrating/scripting.php'>http://www.eclipse.org/birt/documentation/integrating/scripting.php</a>. </p>
    <p>It documents the way events are fired.</p>
    <p>The sequence of events will be that, onCreate event of detail row will be called before onCreate event of cell item which is called before onCreate event of any report item within the cell. The order is from top to bottom and left to right, and all nested elements within a report item before processing moves to next report item at the same level.</p>
    <p> </p>
    <p>Also, note that onCreate event is a generation phase event and onRender is presentation phase event as the above link will tell you.</p>
    <p>When there are separate RunTask and RenderTask all the onCreate events are completed during the run task and then the onRender events are done in the render task.</p>
    <p>When the RunAndRenderTask is used then for each report item the onCreate event will be followed immediately by the onRender event.</p>