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 table generation
petr.mensk
Hello,
I have a following scenario - one query is returning bunch of IDs (let's say 10) and I am saving them into JavaScript array. And then I would like to run another query 10 times (for each ID in that array) and show results in separate tables and charts (more precisely, one query = 1 table and 2 charts). So my question is, is there a way how to generate any number of tables and charts based on the size of my ID array?
Find more posts tagged with
Comments
Hans_vd
Hi Petr,
There is no need to save the ID's in a javascript array.
You can create a table based on the query that returns the ID and within the detail line of that table you can add a second table that takes the ID of the outer table as a parameter.
To have the inner table take the ID as a parameter, select the table, select the binding tab, select the button "Data Set Parameter Binding", there you can select the ID from the outer table.
johnw
If you need to see an example of this, from your BIRT Designer, click on the Window/Show View, and go to Report and Chart Design/Report Designs. Open the SubReport example. In there, there is a tables nested inside of another table. The inner table uses a data set that has a parameter. The outer table is passing in the value of the current row as a parameter. This is done using the Parameter Binding described in Hans post above.
petr.mensk
Thank you for you replies, I got it working:)