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

Bug 325532

Summary: Default value for report parameter is lost when adding that parameter to a data set.
Product: z_Archived Reporter: Sam Ellis <sam.ellis>
Component: BIRTAssignee: Birt-Data-inbox <Birt-Data-inbox>
Status: RESOLVED INVALID QA Contact: Xiaoying Gu <bluesoldier>
Severity: normal    
Priority: P3 CC: bluesoldier, lchan, zqian
Version: 2.6.1   
Target Milestone: 3.7.0   
Hardware: All   
OS: All   
Whiteboard:

Description Sam Ellis CLA 2010-09-16 18:03:50 EDT
Build Identifier: 20100617-1415

I am using Report Designer from Eclipse BIRT 2.6.1RC3. I have a report parameter with a constant default value. When editing a data set and adding that parameter to the set, then the default value for the parameter is lost.

Reproducible: Always

Steps to Reproduce:
1. In the Report Designer, create a new report.
2. Create a data source (rest of description assumes classicmodels example database).
3. Create a new report parameter. I kept everything the default except for "Default value" where I entered the literal string "Petit Auto" (including the double quotes).
4. Create a data set that includes an SQL parameter. The query I entered was:

select CLASSICMODELS.CUSTOMERS.CUSTOMERNAME
from CLASSICMODELS.CUSTOMERS
where CLASSICMODELS.CUSTOMERS.CUSTOMERNAME != ?

5. In the Parameters tab of the Edit Data Set dialog, create a new input parameter and link it to the report parameter created in step 3. Click Ok to get out of the Edit Data Set dialog etc.
6. Edit the parameter created in step 3. Observe that the default value field is now empty, i.e. the previously entered default value is lost.
Comment 1 Xiaoying Gu CLA 2010-10-20 04:03:17 EDT
when the user binds the data set parameter with a report parameter and the data set parameter's value is null. after click "confirm" button and a message box will pop up and if the user chooses to update the report parameter's value with data set parameter's value, the null value will be updated to the report parameter, therefore the value of the report parameter looks like to be "cleared", actually this is the expected behavior. Mark this issue as invalid.