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

Bug 340560

Summary: Usage of Parameter Bindings in Data Sources causes Report Designer to throw errors
Product: z_Archived Reporter: Dmitry Balzer <balzerd>
Component: BIRTAssignee: Birt-Data-inbox <Birt-Data-inbox>
Status: RESOLVED FIXED QA Contact: Tianli Zhang <tzhang>
Severity: critical    
Priority: P3 CC: bluesoldier, lamprecht, mwu, osk, schoenberg
Version: 2.6.2   
Target Milestone: 3.7.0 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard: Obsolete
Attachments:
Description Flags
Error screenshot
none
Sample report with a Report Parameter
none
Sample XML file
none
patch jar
none
patch jar none

Description Dmitry Balzer CLA 2011-03-21 08:22:48 EDT
Build Identifier: Build id: 20110218-0911

Whenever you use a Parameter Binding in a Data Source (f.e. take an XML Data Source and use the "XML Data Source File" Property Binding), the Report Designer will throw errors if you try to create a Data Set that uses this Data Source, making the new Data Set unusable in the Report Designer.

Reproducible: Always

Steps to Reproduce:
1. Create a new empty Report.
2. Create a Report Parameter, say XMLTestFile and point it to a file with input data.
3. Create an XML Data Source and set "XML Data Source File" Property Binding to params["XMLTestFile"].value.
4. Create a Data Set, set it to use the newly created Data Source. Create at least one field in the Data Set and click Finish.

You will get the following error:

A BIRT exception occurred.
  Plug-in Provider:Eclipse.org
  Plug-in Name:BIRT Core Package
  Plug-in ID:org.eclipse.birt.core
  Version:2.6.2.r262_v20110209
  Error Code:birt.core.JavascriptError
  Error Message:Error evaluating Javascript expression. Script engine error: Report parameter "XMLTestFile" does not exist.
 Script source: <inline>, line: 0, text:
params["XMLTestFile"].value

The same functionality was working perfectly in BIRT 2.6.0
Comment 1 Dmitry Balzer CLA 2011-03-21 08:23:36 EDT
Created attachment 191608 [details]
Error screenshot
Comment 2 Dmitry Balzer CLA 2011-03-21 08:25:37 EDT
Created attachment 191609 [details]
Sample report with a Report Parameter

Attached a sample report. Just create a data set that uses the provided Data Source with one field and click OK to get the error.

The create Data Set won't be expandable any more in the Data Explorer tree and unusable in data field bindings.
Comment 3 Dmitry Balzer CLA 2011-03-21 08:26:17 EDT
Created attachment 191610 [details]
Sample XML file
Comment 4 Xiaoying Gu CLA 2011-03-22 21:04:17 EDT
This bug was already fixed in 3.7.0M6. Set as fixed.
Comment 5 Dmitry Balzer CLA 2011-03-23 04:29:23 EDT
Can you please provide a fix for this bug and make available via Help>Check for updates in BIRT?

This particular bug is causes a lot of grief here, as all my reports depend on it.
Please provide a fix asap.
Comment 6 Xiaoying Gu CLA 2011-03-23 05:00:21 EDT
Mingxia,

Can we provide a patch for this bug?
Comment 7 Mingxia Wu CLA 2011-03-23 23:36:46 EDT
Created attachment 191802 [details]
patch jar

Use attached jar file to replace the package org.eclipse.birt.report.designer.ui.data_xxxx under $Eclipse_Home/plugins directory.
Comment 8 Mingxia Wu CLA 2011-03-23 23:38:56 EDT
Created attachment 191803 [details]
patch jar
Comment 9 Dmitry Balzer CLA 2011-03-24 05:27:00 EDT
Thanks guys, much appreciated
Comment 10 Xiaoying Gu CLA 2011-04-06 23:31:36 EDT
*** Bug 342001 has been marked as a duplicate of this bug. ***
Comment 11 Xiaoying Gu CLA 2011-05-06 03:30:56 EDT
*** Bug 344854 has been marked as a duplicate of this bug. ***
Comment 12 Xiaoying Gu CLA 2011-05-12 05:15:47 EDT
*** Bug 345249 has been marked as a duplicate of this bug. ***