Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332678 - Nested tables don't use dataset cache where query will not change
Summary: Nested tables don't use dataset cache where query will not change
Status: VERIFIED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 4.4.1   Edit
Assignee: Zhiqiang Qian CLA
QA Contact: H N CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 14:51 EST by Pinny Markowitz CLA
Modified: 2014-09-17 14:17 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pinny Markowitz CLA 2010-12-15 14:51:06 EST
Build Identifier:  20100917-0705

If a report has a parent table (tableA) using a dataset (ds1), and a nested table within (tableB) using another dataset (ds2).  tableB defines a filter to only use dataset rows where row['id'] match row._outer['id']. The query for 'ds2' will be executed for each row returned by 'ds1' even though the binding for table2 doesn't specify any dataset parameters and the query is exactly the same each time.  This may be considered expected behavior, however it still doesn't provide a method to call the database only one time, while using filtering to provide the needed parent-child relationship.

A workaround suggested on the newsgroup is to nest tableA within the footer of a new 'wrapper' table (tableX) that is bound to 'ds2'.  This causes the result for 'ds2' to be cached, and no more queries are executed for 'ds2'.  An interesting problem with this solution is where the result of the query for 'ds2' returns 0 rows of data.  In this case, the cache appears to be ignored, perhaps because it is empty, and behavior reverts to query the database for each row returned by 'ds1'.  Forcing a dummy row to return can be a workaround for this, but that may not always be an option.

Reproducible: Always
Comment 1 Zhiqiang Qian CLA 2014-07-23 14:12:13 EDT
This was fixed.
Comment 2 H N CLA 2014-09-17 14:07:44 EDT
Verified that when opening a report contains nested table using a different dataset, the data source will be accessed once.

Verified in BIRT 4.4.1 build v20140916-1320.