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

Bug 359460

Summary: Not able to satify selection of sql 'LIKE' and 'IN' conditions all together.
Product: z_Archived Reporter: Annie He <he.annie>
Component: BIRTAssignee: Birt-Data-inbox <Birt-Data-inbox>
Status: NEW --- QA Contact: Maggie Shen <lshen>
Severity: enhancement    
Priority: P3 CC: bluesoldier, Lionel.wyl, lshen, nickr, remy.suen
Version: 3.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Annie He CLA 2011-09-29 13:52:40 EDT
Build Identifier: 20110615-0604

I create a report parameter of STATE and allow multiple values.  In the state parameter, besides importing all the values from the database, I create another value '%' with Display text of 'ALL'; so I can display all states at once.  This will satisfy the SQL WHERE clause as 'WHERE STATE like ?'  It works when user select 'ALL' or select only one State; but not working if a user select 2 or more States.  There is a Warning Dialog: "If a user sets multiple values for the report parameter, the data set parameter uses only the first value".

I try another way to select 2 or more States by create a filter in the data set.  The filter set condition as   row["STATE_"] IN params["State"].value.  I delete the SQL WHERE clause and dataset parameter.   This will satisfy selection of 1 or more States or even all the States by highlighting the selection one by one; but not a selection of user define value % as 'ALL' because % only work in the SQL where clause.

Are there any ways I can satisfy both conditions to display user selection of 'ALL' and selection of 2 or more States together.  Clicking one state at a time to select all State is very inefficient.  This is why I create a user define value of 'ALL' for the Report State parameter selection.  It seems like I can use SQL 'Like' to work for one condition and use SQL 'IN' to work for another condition; but not both together.   Will script able to solve both conditions in BIRT?  If yes, please show me how.


Reproducible: Always
Comment 1 Annie He CLA 2011-10-04 09:52:10 EDT
Hi,

Can anybody help on this problem?  I can't figure it out how to run a sql with LIKE in the where clause when my State report parameter set as '%' value and how to run another sql with IN in the where clause when my State report parameter set as 2 or more values.

Thanks,

Annie
Comment 2 Maggie Shen CLA 2011-11-01 02:18:43 EDT
(In reply to comment #1)
> Hi,
> 
> Can anybody help on this problem?  I can't figure it out how to run a sql with
> LIKE in the where clause when my State report parameter set as '%' value and
> how to run another sql with IN in the where clause when my State report
> parameter set as 2 or more values.
> 
> Thanks,
> 
> Annie

we will consider such an enhancement. Thanks.