Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326500 - Object defined in beforeOpen() method of a data set not recognized in the crosstab
Summary: Object defined in beforeOpen() method of a data set not recognized in the cro...
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-Chart-inbox@eclipse.org CLA
QA Contact: Maggie Shen CLA
URL:
Whiteboard: Need-Auto
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 05:05 EDT by Bharath CLA
Modified: 2011-05-26 13:32 EDT (History)
1 user (show)

See Also:


Attachments
report design file (29.12 KB, application/octet-stream)
2010-09-29 05:08 EDT, Bharath CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.