Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 211400

Summary: PreparedQuery required from IResultIterator
Product: z_Archived Reporter: Heng Li <liheeng>
Component: BIRTAssignee: Wei Wang <wwang>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: dmichonneau, lshen, lzhu, qaobsolete, wyan, xwang
Version: 2.3.0   
Target Milestone: 2.3.0 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 208409, 213887    
Attachments:
Description Flags
Sample report file
none
data for sample report none

Description Heng Li CLA 2007-11-29 04:09:57 EST
Build ID: I20071101-2000

Since the requirement of #208409, chart want to get QueryDefintion from IResultIterator to check if the result is grouped, so chart will execute IResultIterator.getQueryResults( ).getPreparedQuery( )		.getReportQueryDefn( ).getGroups( ) to retrieve it. But now the getPreparedQuery will return null in Web viewer's case(#210490).
Comment 1 Lin Zhu CLA 2007-11-29 05:23:06 EST
Fixed.
Comment 2 Heng Li CLA 2008-01-15 22:14:32 EST
Created attachment 87003 [details]
Sample report file
Comment 3 Lin Zhu CLA 2008-01-15 22:17:55 EST
Looks as if in M5 the bug appears again. Reopen it.
Comment 4 Heng Li CLA 2008-01-15 22:17:56 EST
Created attachment 87005 [details]
data for sample report
Comment 5 Heng Li CLA 2008-01-15 22:19:54 EST
The issue still exists, please use attached sample report and data to reproduce.
Thanks.
Comment 6 Lin Zhu CLA 2008-01-16 02:25:05 EST
This is a new problem. The NPE is thrown when a chart is sharing the result set data of a table. The problem related to the engine's approach to access IQueryResults instance for report item sharing.

In current engine implementation, the IQueryResults instance, when in report item sharing, is acquired using api DataEngine.getQueryResults(String id). By this means no IPreparedQuery instance is created so that when user call api IQueryResults.getPreparedQuery() a null value will be return.

If engine acquire result iterator by following DataEngine.prepare()-->PreparedQuery.execute() way (exactly same as how engine execute a normal query), then a PrepareQuery will be generated for QueryResults that from Report item sharing so that solve the problem.

Reassign the bug to engine for the fix.
Comment 7 Wei Wang CLA 2008-01-28 00:52:17 EST
Fix bug as Comment #6.

set FIXED.
Comment 8 Xiaodan Wang CLA 2008-02-04 03:18:54 EST
Verified in build (2.3.0.v20080204-0800).