Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351340 - Unwanted empty element on the ListBox (Parameters screen)
Summary: Unwanted empty element on the ListBox (Parameters screen)
Status: RESOLVED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Birt-ReportViewer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 10:47 EDT by yacoll CLA
Modified: 2011-07-07 02:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yacoll CLA 2011-07-06 10:47:00 EDT
Build Identifier: birt 2.6.2

I created "Cascading Parameter Group" on my report and configure a parameter (displayed as ListBox) that is dependent on the other parameter's value. There is an empty row displayed in the dropdown at first position. It can be chosen by the user and the message "Value of required parameter [Orders] is not specified" is displayed then.

I can't force Birt NOT to display this empty row which I consider a bug.

Best regards!

Reproducible: Always

Steps to Reproduce:
1. Create new report
2. Create new DataSource of type "New Classic Models Inc. Sample Data Source"
3. Create new DataSet CUSTOMERS (based on SELECT * FROM CLASSICMODELS.CUSTOMERS query)
4. Create new DataSet ORDERS (based on SELECT * FROM CLASSICMODELS.ORDERS query)
5. Create new Cascading Parameter Group
6. Select "Multiple Data Sets" radiobutton
7. Add "Customers" parameter with values:
    a) Name: Customers
    b) Data Set: CUSTOMERS
    c) Value: CUSTOMERNUMBER
    d) Display Text: CUSTOMERNAME
    e) Data Type: Integer
    f) Display Type: List Box
    g) Is Required: true
8. Add "Orders" parameter with values:
    a) Name: Orders
    b) Data Set: ORDERS
    c) Value: ORDERNUMBER
    d) Display Text: ORDERNUMBER
    e) Data Type: Integer
    f) Display Type: List Box
    g) Is Required: true
9) Go back to ORDERS Dataset and change the query to the following: SELECT * FROM CLASSICMODELS.ORDERS query where CUSTOMERNUMBER = ?
10) Add parameter to the dataset: 
    a) Name: CustomerNumber
    b) Data Type: Integer
    c) Direction: Input
    d) Default Value: params["Customers"].value
11) Run Report. "Parameter" window should be displayed first with two dropdowns: Customers{} and Orders{}. Every time when you change the customer the content of Orders dropdown changes accordingly.
12) The very first element on the Orders dropdown is empty. It can be chosen by the user and after submit the message is displayed: "Value of required parameter [Orders] is not specified"
13) When you turn on Firebug then you can see the SOAP message content that is transmitted on every Customers dropdown change. It contains the following XML (below). The first "Selections" element is empty.

<Data>
    <CascadeParameter>
        <SelectionList>
            <Name>Orders</Name>
            <Selections>
                <Value></Value>
                <Label></Label>
            </Selections>
            <Selections>
                <Value>10103</Value>
                <Label>10103</Label>
            </Selections>
            ........
        </SelectionList>
    </CascadeParameter>
</Data>

I considered this behaviour as a bug because I can't force Birt NOT to show this empty element on Orders dropdown.
Comment 1 Xiaoying Gu CLA 2011-07-07 02:29:39 EDT
I think it's correct behavior since there is no default value for Orders param. This works sames for cascading parameters or a normal parameter in list box type.
Comment 2 Xiaoying Gu CLA 2011-07-07 02:31:16 EDT
set as invalid based on previous comment.