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)
Filters disables on table bounded on a "report item"
acervantes
Hi guys,
I'm trying to add a filter on "Table B" that is bound to another "Table A" an this "Table A" is bound to a Data Set, the Data Source is an xml file, but the filter options ( Add, Edit, Remove, Up, Down) on the Filters Tab are disable.
How can I create a filter on this "Table B"?
I'm using:
Eclipse Platform
Version: 3.4.1
Build id: M20080911-1700
Windows XP
Thanks,
ALCE
Find more posts tagged with
Comments
mwilliams
Hi ALCE,
You'll need to create a new table that is bound to the dataSet to apply the filters you want. In 2.3.x, I think the query should only run once, even if you have 2 tables tied to it.
acervantes
Michael, first of all thanks for your reply... <br />
<br />
My problem is with the filter on the second table tied to the first table ( the first table is bound to the dataSet). <br />
<br />
In the second table the filter options are disable. why? ... how can I create a filter in the second table?<br />
<br />
The first table I want to use it to control a group header and the second table as detail with few rows by each group header.<br />
<br />
Best Regards,<br />
ALCE<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Hi ALCE,<br />
<br />
You'll need to create a new table that is bound to the dataSet to apply the filters you want. In 2.3.x, I think the query should only run once, even if you have 2 tables tied to it.</p></blockquote>
mwilliams
ALCE,
Just like you, I thought that you could filter the data in the second table as well. I saw exactly what you described when I checked in 2.3.1 and 2.3.2, which is why I suggested that you'd just have to create the same table twice and filter the second one. The query should still only be run once doing it this way as well.
If you can describe more of how your data looks and what you're looking for in your table, I may or may not be able to suggest another way to go about solving your issue.
acervantes
Hi Michael, thanks for your reply...<br />
<br />
I have created an example (please, see attachment) I've described the steps that I did and what I'm looking for my report.<br />
<br />
<br />
1.- Create a Data Source with Classic Models Inc.<br />
2.- Create a Data Set for Customer's DB-Table.<br />
3.- Drag and drop the Data-Set to create a table associated to the Data-Set and named it to Tbl_ MAIN ( I supposed doing this the query is executed only one time ), in this table I did a Group over the State column.<br />
<br />
4.- Create a Table element and named it Tbl_1, in the Binding Tab associate this Tbl_1 to the Tbl_MAIN, insert the group created by State.<br />
<br />
5.- In the first detail row, insert a new Table element and named it Tbl_2, in this table I would like to show Countries associated to the State group created in the first table (Tbl_1), but I want to create a filter to show only USA for example.<br />
<br />
I have done two test in this part:<br />
<br />
a) in the Binding Tab I have tried associate the report item Tbl_MAIN, the Filters TAB options are disable. How can I create a filter over Country considering this test? Even without filtering, the table does not show any data.<br />
<br />
<br />
b) without binding any table, the Filters TAB options are enable, so, I create my filter over country = USA. Preview the report I I got the following error:<br />
<br />
******************************************<br />
Table Tbl_2: <br />
+ Report item sharing cannot be used for subquery. <br />
******************************************<br />
<br />
So, I'm looking for a Report with the following:<br />
<br />
- The query would be executed only one time.<br />
- A table with a State group.<br />
- The first row in the report detail must display records with filter Contry = USA<br />
- The second row in the report detail must display records with filter City = Cambridge<br />
<br />
I hope I have been clear in my explanation.<br />
<br />
I'll look forward to hearing from you.<br />
<br />
Best Regards,<br />
ALCE<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>ALCE,<br />
<br />
Just like you, I thought that you could filter the data in the second table as well. I saw exactly what you described when I checked in 2.3.1 and 2.3.2, which is why I suggested that you'd just have to create the same table twice and filter the second one. The query should still only be run once doing it this way as well.<br />
<br />
If you can describe more of how your data looks and what you're looking for in your table, I may or may not be able to suggest another way to go about solving your issue.</p></blockquote>
mwilliams
ALCE,<br />
<br />
The only other thing I can suggest besides binding each table to the dataSet would be to log a bug/enhancement request at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a> and see what they say.
acervantes
Michael,<br />
<br />
Before log a bug/engancement I did a new search in Bugzilla and find a case ( <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=130267'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=130267</a>
; ) that help me to understand how does Birt work and I find the solution.<br />
<br />
***************************************************<br />
The data scope of a subquery depends on where it is placed: <br />
(1) If the subquery table is placed in the header/footer of a group or the<br />
table, the subquery operates on the group/table's result set. This is the most<br />
common use of subquery and is currently working.<br />
(2) If the subquery table is placed on a detail row, the subquery operates on<br />
the current data row. This is a degenerate case, and the subquery table acts<br />
similarly to a data item.<br />
***************************************************<br />
<br />
My query is executed only 2 times, the second table must be inserted in the header of a group instead detail row without binding anything, in this way the filters tab options are enable and I could create my filter.<br />
<br />
Thanks a lot!<br />
<br />
Regards,<br />
ALCE<br />
<br />
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>ALCE,<br />
<br />
The only other thing I can suggest besides binding each table to the dataSet would be to log a bug/enhancement request at <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>BIRT
: Reporting Bugs and Requesting Enhancements</a> and see what they say.</p></blockquote>
mwilliams
ALCE,
Glad to hear you've got it working. Thanks for posting the solution you found. Let us know if you have any other questions.