COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: arroju_venkat on 30 Jan 2009 04:24:56 AM

Title: Multiselect in different filter conditions.
Post by: arroju_venkat on 30 Jan 2009 04:24:56 AM
Hi,

We need to apply filter based on the list prompt selected value, this was working fine If the prompt is single select list prompt. But our requirement is for multi select list prompt hence we need to apply with different filter conditions for each status.Ex: For status 'Open' ,we need to use Open Date,for status 'Cancelled' use Cancelled Date etc.

Ex:
if (?Req_Status? contains 'Open') then
(if (?As of Today? = 1) then
(to_date(to_char([H_REQ_POSTED_DATE],'YYYY-MM-DD'),'YYYY-MM-DD')>=?Start Date? AND to_date(to_char([H_REQ_POSTED_DATE],'YYYY-MM-DD'),'YYYY-MM-DD')<=?End Date?)
else
(to_date(to_char([H_REQ_POSTED_DATE],'YYYY-MM-DD'),'YYYY-MM-DD')<= current_date))
else
(1=2)

The above condition is working if we are using “=” and for single select but for multi select we are getting the following syntax error. Kindly let me know how to resolve this issue.

An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'.
UDA-SQL-0358 Line 8: Syntax error near ">=".

Thanks,
Venkat.