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)
Multiple Tables on Same Dataset
lampan
Hi,
I have designed a report with 2 scripted Datasets (master/detail).
So I have a table for the master and at its detail I have placed 4 tables binded to the detail dataset using visibility conditions on their detail's lines to satisfy a need.
The detail dataset is filtered by a parameter passed by the master table detail line.
It works but I saw in eclipse that it hits the database multiple times.
For example if I have 5 master entities with some details, it will hit the database once for the master and 5*4=20 times for the detail!
And it gets even worse as I have about 200 master entities usually.
Is there any workaround?
I have tried removing the dataset parameter and putting the filter on the table but I get the same result.
Maybe I could assign a Dataset to another Dataset in order to avoid DB reads?
Thank you in advance
Find more posts tagged with
Comments
mwilliams
What is your BIRT version? Can you attach your report so I can see how you're passing the parameter to the inner dataSet?
lampan
BIRT Version 2.6.1.
I uploaded 2 reports, one using dataset parameter and the other using table filter.
The result is the same.
Thanks for the help.
mwilliams
Hmmm. So, these both call the database the same amount of times? With the newer versions, there has been improved caching to limit database accesses, but I've noticed several saying that when using embedded tables, that they still get calls for each table created.
You might try storing your data into new arrays in your onFetch script of your original dataSets and then creating a new scripted dataSet using these new arrays. You'll need to make sure to put a hidden text box attached to your original dataSet at the top of your report so that it for sure runs before the other dataSet. Then, you can create your tables off the new dataSets and maybe they won't call out to your database multiple times.
If this doesn't work, the dataSet parameter binding option should be the more efficient of the attached reports.
lampan
Ok, I will try the arrays and the new Datasets and I'll let you know.
Thank you
mwilliams
Yes, please let me know!
lampan
You rule!
It worked perfectly!!
You saved me from a dead end!
Thank you again!
mwilliams
You're very welcome. Glad to help! Let us know whenever you have questions!
bipz123
plz let me know about the query need to achieve this
mwilliams
Can you explain more about where you're stuck?
Rani
<p>Jason,</p>
<p> </p>
<p>I appreciate if you can share a sample report with Arrays concept to load multiple columns.</p>
<p> </p>
<p>Thanks.</p>