How to use nested table-data or list in table?

iparker
edited February 11, 2022 in Analytics #1
Hello,

I have a question about the output nested data. How is the procedure to output nested data, for example a table in another table or a list in a table-cell?

The problem I see is that I have to access the parent_id in the child-sql-statement. The only way I see is to create a report-parameter, write the parent_id into this parameter while output the parent-data and use this variable in the child-sql-statement as parameter.

So is this the correct way or are there better options to solve this problem?

Timo

Comments

  • mwilliams
    edited December 31, 1969 #2
    Hi Timo,

    You can use a dataSet parameter in the embedded table's dataSet's query to limit the data. Then, in the binding tab in the property editor, you can click on the dataSet parameter binding button and set the binding to be the key from the outer table that will get you the correct info. Hope this helps. Let me know if you have questions or would like an example.
    Warning No formatter is installed for the format ipb
  • iparker
    edited December 31, 1969 #3
    Hello Michael,

    Is this also possible without the use of any parameter? I tried to set a filter in the filter-tab of the embedded table, and I set a equal-filter to the parent_id via row._outer["parent_id"]. And it seems to work.

    Is the disadvantage of this solution that BIRT queries all data from the child-table and filters after the execution of the query?
  • CBR
    CBR
    edited December 31, 1969 #4
    you re right. Using the filter functionaltiy of the BIRT framework instead of using a where clause in your sql query means that all data is fetched from database and afterwards this data is filtered using Java.
    That's the reason why filtering or sorting your data is always faster when you let the database doing the work.
  • iparker
    edited December 31, 1969 #5
    Ok - thanks for your answer!
  • delonge182
    edited December 31, 1969 #6
    <blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="59062" data-time="1263399389" data-date="13 January 2010 - 09:16 AM"><p>
    Hi Timo,<br />
    <br />
    <br />
    You can use a dataSet parameter in the embedded table's dataSet's query to limit the data. Then, in the binding tab in the property editor, you can click on the dataSet parameter binding button and set the binding to be the key from the outer table that will get you the correct info. Hope this helps. Let me know if you have questions or would like an example.<br /></p></blockquote>
    <br />
    thank u mwilliams.<br />
    this tutorial help me a lot.<br />
    <br />
    this is what i'm looking for.
  • mwilliams
    edited December 31, 1969 #7
    Hi delonge182,

    Glad to help! Let us know whenever you have BIRT questions! :)
    Warning No formatter is installed for the format ipb
  • <p>Apologies for re-opening this topic again.</p>
    <p> </p>
    <p>The inner table can be filtered by using <span>row._outer["parent_id"]. But then disadvantage is also discussed that dataset would get all the data and then filter it out, which is not a good practice if there are multiple child tables and fetching small data from huge resultset. So whats is the best way to achieve this nested table logic without hampering the performance of report. </span></p>
    <p> </p>
    <p><span>Apologies, if I missed to understand this properly..</span></p>
    <p> </p>
    <p>Thanks</p>