Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT Multiple table in single report using scripted data source
muthuvel
<p>I am developing a scripted data source based report , which has 3 tables ,</p>
<p> </p>
<p>first table is the master of second table , will have only one row.</p>
<p> </p>
<p>second table is master of third table will have maximum of 10 rows.</p>
<p> </p>
<p>third table will have more then 30 rows.</p>
<p> </p>
<p>I want to list them to one after another [independently] as shown below.</p>
<p> </p>
<p>TABLE 1 ROWS</p>
<p> </p>
<p>TABLE 2 ROWS</p>
<p> </p>
<p>TABLE 3 ROWS</p>
<p> </p>
<p>I am using JSON object to load tables in the fetch method.</p>
<p> </p>
<p>I am facing following problems.</p>
<p> </p>
<p>1) open method is called 3 times , hence , my client code is called 3 times ,making 3 server call and this slows the report by loading same data again and again. How can I make sure that open method is called only once for the 3 tables ?</p>
<p> </p>
<p>2) to solve the above problem , I tried to create 3 separate data sets and datasources for each table , But BIRT allowing me to drag columns from only one data set for all the 3 tables , how can load 3 tables independent of each other ?</p>
<p> </p>
<p>your earlier reply appreciated.</p>
Find more posts tagged with
Comments
Clement Wong
<p>Do your tables use the same data?</p>
<p> </p>
<p>If so, yes, you can use your scripted data source for your JSON for the first table. In the Fetch method, save off the values you need into an array.</p>
<p> </p>
<p>Now, create a new simple scripted data source and loop through the array to fetch the values for the 2nd and 3rd table.</p>
muthuvel
<p>Dear Wong,</p>
<p> </p>
<p> thanks for your reply !.</p>
<p> </p>
<p> I have used separate data-set for each table and each data-set has it own open ,fetch and close method.it is working fine now.</p>
Clement Wong
<p>Glad to hear it's working.</p>