COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Veronis on 20 Mar 2015 11:15:38 AM

Title: Date Range prompt - user-defined NULL handling?
Post by: Veronis on 20 Mar 2015 11:15:38 AM
Using Cognos 10.1.1

I have a report with 7 Date Range fields. They're all optional so default to earliest/latest.

I have a filter for each, such as: [Presentation Layer].[Schedule Query].[Approved_Forecast_Finish_Dt] in_range ?p_task_forecast_date?

If I wanted to exclude NULLs, I could write an AND statement in the filter, but that's not what I need.

I need the user to be able to select whether they want to see ALL date values (NULL and Date), Dates only (no NULLs), or NULLs only (no dates). This is ideally a drop-down value prompt under each date range prompt.

Is this possible? If I can do this with a data item and a case statement somehow, how would I go about this?
Title: Re: Date Range prompt - user-defined NULL handling?
Post by: TheFrenchGuy on 20 Mar 2015 11:29:01 AM
Hi

I didn't really understood your need. But you can pass through a first prompt which is conditionally filled to retrieve the good data item
For example a first prompt (?Select?) which show the good prompt (YTM or Month) :
if (?Select? in ('YTM'))
then ([Year] in (?Selected Year?;?Selected Year?-1) and ([Year's month (01-12)] <= (?Selected Month?)))
else ([Month ID] in (?Selected Date?;?Selected Date?-100))


Hope it'll be usefull