COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: dlafrance on 03 Jun 2008 02:41:14 PM

Title: Problem Using Date Prompt to filter
Post by: dlafrance on 03 Jun 2008 02:41:14 PM
Hi,

I want to use 2 date prompt, so the user can select a span of two dates. So, i wanted to get the member of each date like this way :

prevMember([package].[Date].[Date].[Day]->?pDateFrom?) and
[package].[Date].[Date].[Day]->?pDateTo?

The problem i have is Report Studio cannot get the member since (i think) date prompt return a string and not a date or a member.

Is there a way to use date prompt in this way?

P.S I use already value prompt for my date but this is getting too heavy and thats the reason i want to switch to date prompt.

Thank you!

David
Title: Re: Problem Using Date Prompt to filter
Post by: bonniehsueh on 16 Jun 2008 06:48:17 AM
Another option is using Tree prompts. That way you should be using the same member concept. You can also set up the Tree prompt to show only certain levels so you don't have to start at the highest level (2007) and drill to trimester, month, etc. The thing with that is performance can be slow if using DMR. Haven't worked with Cubes as the data source but heard that its faster.
Title: Re: Problem Using Date Prompt to filter
Post by: rockytopmark on 17 Jun 2008 08:46:10 AM
Report Studio interrogates the Metadata in the model and determines the datatype, so your example filter will generate parameters of the Date datatype, if your [Day] level is indeed a Date.

Try using the dimensional expression:
Filter([edge_column], [package].[Date].[Date].[Day] between pDateFrom? and ?pDateTo?)
...on your report object's dimension column/edge.