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)
Passing Data Between Queries in a Report
zsolson
Hi all,
I'm new to BIRT and I'm in need of some assistance. I have two queries that a need to combine by using a joint dataset. The first is very manageable and works fine. The second query has no real qualifications without data from the first query and without any filtering, the result set is so large that BIRT freezes and times out. So, basically, I need to know how to get data returned from one query to help filter and qualify the second query.
The data that needs to be moved between the queries is a series of strings, one from each row returned in the first query.
Thanks for any possible help!
Find more posts tagged with
Comments
thuston
I assume the sets are on different databases (or different sources). If not, just do this as a single dataset and let the database do the work.
Some options to get the large dataset to do some filtering before the join would be to:
1) Use the smaller dataset to also setup dynamic list parameters used by the larger set.
2) Instead of Joint dataset, parameterize the larger and use nested tables.
3) Keep the joint dataset, but use script to read the smaller set before you use the joint set and build a list to be used to set an SQL IN filter in the larger dataset query.
zsolson
thuston,
The sets are on different databases. Do you have an example of how I'd do option 1 or 3? Because of the required design of the report, option two wouldn't work.
Thanks!
thuston
For 3, put a table using the smaller dataset at the beginning and in the detail script onCreate you can populate a global variable.
Then in the larger dataset you can script beforeOpen to update the queryText and add you value(s) to the Where clause.
zsolson
Perfect! That's exactly what I needed to know. Thanks!