COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: axxo on 01 Apr 2009 06:24:00 PM

Title: Set Date prompt to query data item
Post by: axxo on 01 Apr 2009 06:24:00 PM
I have a query that finds the maximum start for financial year. What I want to do is to take that result and make it the default selection in my date prompt in my prompt page.

Does anyone know how to achieve this??
Title: Re: Set Date prompt to query data item
Post by: prakashraju987 on 02 Apr 2009 01:17:13 AM
Explain Breifly and will find the solution
Title: Re: Set Date prompt to query data item
Post by: david.stachon on 02 Apr 2009 01:51:01 AM
Using the out-of-the-box date prompt objects I think you may be out of luck as you cannot attach a query to them.
Title: Re: Set Date prompt to query data item
Post by: axxo on 02 Apr 2009 05:04:09 AM

Thanks for replies. Someone in my team says they have seen soemone else do itand we are waiting to hear back about it. Of course will post the answer if there is a working solution.

david.stachon, where can I get an out of the box prompt :o Please tell :)

prakashraju987, I have data spanning, lets say, 20 years. There is going to be 20 dates with first of July in this data source. What I want to do is find the latest most recent "first of July" (and I've done that already in a query)

The Problem: I want to take that result from THAT query and use it as the default selection in my date prompt.
Title: Re: Set Date prompt to query data item
Post by: david.stachon on 03 Apr 2009 10:56:00 PM
...you know what you could do, instead of using "date prompts",

have three normal drop down lists:

one for each day, month and year. Those are easy enough to set values on. (and, very common on web-sites so people know how to use them)

As for setting it up on date prompts....you're looking at probably SDK or j-script. Both of which, means coding and probable difficulties in upgrading.

good luck!