Home » Archived » BIRT » How to search for multiple values when a particular parameter is selected(When a value is selected, I need the query to search on that value plus 1-3 other pre-defined values)
How to search for multiple values when a particular parameter is selected [message #1709611] |
Tue, 29 September 2015 14:36 |
Scott Williams Messages: 10 Registered: March 2014 |
Junior Member |
|
|
I'm new to BIRT so please bear with me. I have a report where the user selects a string value for one of the parameters. The value of that parameter is then used in one of the data set queries. What I want to accomplish is, when a particular value is selected, I need the report to also search for 1-3 other pre-defined values in the query. For example, if the user selects F-MAC, I want the data set to return all results where the category is F-MAC, as well as C-CDB, F-FMB, and M-MAC. If they select F-DAMAGE the data set should return all results where the category is F-DAMAGE as well as M-DAMAGE.
The parameter, Categories, is Static, with 4 values available.
Here is the query that uses the value of that parameter:
select
WO_WORKORDER,
WO_STATUS,
WO_DATE_COMPLETED,
PH_PHASE,
PH_STATUS,
WO_CATEGORY,
WO_CATEGORY_DESC,
WO_DEPT_DESC,
WO_DEPT_ID,
WO_FACILITY_DESC,
WO_BUILDING_DESC,
FTD_TRAN_TYPE,
FTD_AMOUNT,
FTD_TM_TYPE
from VW_WO_BILLING
where
WO_TYPE = 'F'
and WO_STATUS = 'CLOSED'
and PH_STATUS = 'CLOSED'
and FTD_TRAN_TYPE in ('CW','WX','TW','TP')
and WO_CATEGORY = ?
and
(wo_dept_id = ? or ? = 'ALL')
and TRUNC(WO_DATE_COMPLETED) >= ?
and TRUNC(WO_DATE_COMPLETED) <= ?
and FTD_AMOUNT <> 0
My back-up plan is to change the parameter to "Allow Multiple Values" and add all of the Categories. The user would then have to know which to select for each case. This is undesirable, but if there's no way to accomplish what I'm trying to do then so be it. Thanks in advance.
|
|
| | | | | |
Goto Forum:
Current Time: Fri Apr 26 20:06:29 GMT 2024
Powered by FUDForum. Page generated in 0.03653 seconds
|