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)
Dataset Filter Problem..Please Help.
kalapatt
Hi Guys,
I am using Birt 2.3.1. I have a dataset , say "dataset1" in my report with a list of user_ids. I want to filter this dataset based on the values from another dataset, say "dataset2". I tried to create a filter with "IN". But when I go to the expression builder, the available dataset shows only one dataset which is the source dataset "dataset1". This problem I have generally seen as the available dataset shows only the currently selected dataset. Any ideas?
Please help..
Regards
Kalapatt
Find more posts tagged with
Comments
bhanley
Can you use the SELECT query for Data Set 2 as a sub-query in Data Set 1? This would allow you to add the appropriate restrictions to the Query via the IN clause and not have a second data set.
An alternative option could be to create Data Set 1 and Data Set 2 and then create a Joint Data Set that would join the two sets on a particular field using whatever paradigm suited your needs (inner, outer, etc...).
There are more options but those are the most obvious. Let me know if they do not work and we need to look at more ideas.
kalapatt
Subquery would be a better options for me. How do i do this?
kalapatt
The problem is Dataset2 is a webservice. I now found another way to do it but its still not really working. I defined a parameter which takes the values of dataset2 and then made a filter on dataset1 based on this report parameter which i set as "allow multiple values". This would work if i run the report and select multiple values for the parameter. But the parameter should not be visible to users. Any ideas how I can all possible values from a parameter for the IN clause of dataset1? or use dataset2 as source for the IN clause for dataset1?
bhanley
Did you look at the possibility of building the Joint Data Set? It sounds like what you need is a classic join from two different sources. The Joint Data Set does just this.
Otherwise, your parameter approach is one I was thinking of recommending and can work well. Simply bind the results of Data Set 2 to your multi-value parameter. Mark the parameter as "Hidden" and your user will never be prompted for input (which is what I think the issue is at this point).
kalapatt
yes.. i can make the parameter hidden. But then the multiple values with in the parameter are not selected. How can I say, the dataset1 should use all values of the parameter?
kalapatt
if there is no option to do this, I will go on with the join option
bhanley
I do not believe that the binding of multiple values by default to a parameter is supported in the current release.
You can do this today with some simple scripting in order to add the values to the parameter when the data set is initialized. Short of that, explore the joint data set option, it should provide you what you are looking for.
I will file a TED with the BIRT engineers in order to get this feature looked at and potentially added to a future release.
bhanley
FYI, I filed this as an issue. Feel free to track the progress as it is reviewed.<br />
<br />
<a class='bbc_url' href='
http://ted.birt-exchange.com/show_bug.cgi?id=57'>Redirecting
to BIRT Exchange</a>
kalapatt
Apart from this, any ideas why the datasets are not visible when you go to expression builder? I mean, if i want to design a filter on dataset1 and go to expression builder,the only dataset visible under "Available datasets" is dataset1. None of the other datasets defined in the project is not visible there. Is this some sort of a bug?