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)
table filter scope problem
comag
Hi,
if i define a filter (in my case a TOP n filter) i'm unable to access the whole dataset bound to this table anymore. So i'm not able to, lets say, get the total sum of a column. All computations are now only based on that filter restrictions.
If i access row["value"] of the column bindings this behavior is ok for me, but if i access the dataset directly via dataSetRow["value"] the behavior is the same - this a bug in my opinion cause i restricted the table - not the whole dataset.
The strange thing is, if the table has NO filter but a table group of this table got the TOP n filter, an aggregation of row["value"] with table scope is also restricted by this group-filter which is very irritating.
So my question is: how to access the whole dataset if i define a table filter? (I'm using a scripted dataset)
I worked around this problem by defining the visibilty of the detail row to be hidden if rownum >= 10 but this is a dirty hack.
any suggestions?
Find more posts tagged with
Comments
mwilliams
Hi comag,
Is this issue reproduceable with the sample database? Or is it something that only happens with the scripted dataSource?
comag
hi mwilliams, thanks for your reply.
i tested a data source with the sample database.
For this i used "select * from CLASSICMODELS.CUSTOMERS" as data set.
My table consists of the columns CITY, CUSTOMERNAME and CREDITLIMIT.
I added sorting by CREDITLIMIT desc to the table and a filter "TOP 10" by creditlimit.
In the footer of the CREDITLIMIT i added an aggregation of SUM dataSetRow["CREDITLIMIT"] -> but this returns only the sum of the top 10. not the whole dataset.
Next i created a second table with a group on CITY and added a filter only on this group. Even the aggregation on dataSetRow["CREDITLIMIT"] in table scope did not show the total sum of the dataset.
so this problem is not a scripted dataset one.
mwilliams
comag,
What are you trying to figure? Can you use your scripted dataSet to figure the totals of the dataSet and store these values in variables to use in your table?
comag
yes it is possible the preprocess my scripted dataset and extract the totals but this is a hack too.
i just dont understand why a filter on the table or a tablegroup denies access to the whole dataset bound to this table. this is very annoying.
If a table with TOP 3 should look like the following it is currently not possible to implement it with BIRT:
| User |Income|
|
|
|
| A | 100 |
| B | 90 |
| C | 85 |
|
|
|
|All Users | 12676 |
BIRT will show 275 instead of 12676 cause it sums only the filtered data.
mwilliams
comag,<br />
<br />
You can file a bug for this at <a class='bbc_url' href='
http://www.birt-exchange.org/bug-reporting/'>Report
Bugs - BIRT Exchange</a> and see what they say.<br />
<br />
Normally, I would suggest creating a computed column, which is just an aggregation on the dataSet, in the dataSet to use in your calculations. This is the same thing as preprocessing your data in the scripted dataSet to get the total to put out in a "computed column" since there is not a computed column option in the scripted dataSet editor. As you said, this is just a hack if you expect to be able to access the entire dataSet through a filtered table. So, if they come back and say this is not a bug, it's the functionality of a filtered table, you could then file an enhancement request for the same.<br />
<br />
Hope this helps.