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

Bug 326500

Summary: Object defined in beforeOpen() method of a data set not recognized in the crosstab
Product: z_Archived Reporter: Bharath <littleheartb4u>
Component: BIRTAssignee: Birt-Chart-inbox <Birt-Chart-inbox>
Status: VERIFIED FIXED QA Contact: Maggie Shen <lshen>
Severity: normal    
Priority: P3 CC: bluesoldier
Version: 2.3.2   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Windows XP   
Whiteboard: Need-Auto
Attachments:
Description Flags
report design file none

Description Bharath CLA 2010-09-29 05:05:32 EDT
Build Identifier: 2.3.2.2

I'm using BIRT 2.3.2.2 to create report templates for RTC. When I define an object in beforeOpen() method of a dataset and use a chart/table and crosstab in the same report, chart/table displays fine, but crosstab throws an error saying the object is not defined.

Reproducible: Always

Steps to Reproduce:
1. Create a data source from Classic Models Inc. SampleDB
2. Create a data set(Data Set1) from EMPLOYEES table with columns EMPLOYEENUMBER, FIRSTNAME, REPORTSTO, OFFICECODE
3. Create another data set (Data Set2 in the attached file) from OFFICES table with columns OFFICECODE, PHONE
4. For Data Set2, 
	a. In beforeOpen() method declare an object. officePhone = new Object();
	b. In onFetch() metohd using the following expressoin:                  officePhone[row["OFFICECODE"]] = row["PHONE"];
5. In Data Set1, create a computed column "OfficePhone" with the expression: officePhone[row["OFFICECODE"]];
6. Create a data cube from Data Set1, with FIRSTNAME, OFFICECODE as groups and REPORTSTO as summary field.
7. Now, in the report layout, insert a dynamic text with the expression Total.count(); and bind it to Data Set2.
8. Drag Data Set1 as a table into report layout.
9. Create a cross tab with the data cube ceated earlier.
10.Preview.
11.Table displays properly but cross tab shows an error saying Fail to compute value for column "OfficePhone". ReferrenceError: officePhone not defined.
Comment 1 Bharath CLA 2010-09-29 05:08:35 EDT
Created attachment 179815 [details]
report design file

This is report design file that helps you to reproduce the error.
Comment 2 Xiaoying Gu CLA 2010-10-09 00:59:53 EDT
This issue can not be reproduced in the offical 2.6.1 release build.

Could you please try the 2.6.1 R-build?
Comment 3 Xiaoying Gu CLA 2010-11-02 01:50:17 EDT
Set as fixed based on comment #2.

Please feel free to reopen if there is any issues.
Comment 4 Maggie Shen CLA 2010-11-19 05:00:17 EST
close. not reproducible with latest build of birt.