Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359460 - Not able to satify selection of sql 'LIKE' and 'IN' conditions all together.
Summary: Not able to satify selection of sql 'LIKE' and 'IN' conditions all together.
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 3.7.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact: Maggie Shen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 13:52 EDT by Annie He CLA
Modified: 2014-08-26 18:55 EDT (History)
5 users (show)

See Also:


Attachments

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