COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: v2k4u on 03 Dec 2013 09:43:01 AM

Title: How to Create a FROM and TO Date Prompts
Post by: v2k4u on 03 Dec 2013 09:43:01 AM
Hi I need some help with creating FROM and TO date prompts for the users to select the dates based on a Report_Date parameter.
Title: Re: How to Create a FROM and TO Date Prompts
Post by: Lynn on 03 Dec 2013 09:49:29 AM
At what point are you getting stuck?

Sounds to me like you need two parameters such as DateFrom and DateTo. You could use a calendar prompt control for each.

Then set the filter in your query something like [YourQueryItemDate] between ?DateFrom? and ?DateTo?
Title: Re: How to Create a FROM and TO Date Prompts
Post by: v2k4u on 03 Dec 2013 09:55:42 AM
How can we display them in a single page and do the DateFrom and DateTo parameters need to be created based on a Report_date data item that we already have?

Pardon my questions if they sound silly as i am new in designing these kind of propmpts....
Title: Re: How to Create a FROM and TO Date Prompts
Post by: BigChris on 03 Dec 2013 10:11:34 AM
Hi,

You can create a new prompt page (go to the Pages navigator and drag in a prompt page). On there you can drop two date prompts, and call them BeginDate and EndDate respectively. In your query you'd then create a filter which would look something like [Report_Date] between ?BeginDate? and ?EndDate?
Title: Re: How to Create a FROM and TO Date Prompts
Post by: Lynn on 03 Dec 2013 10:13:57 AM
Take a look at chapter 12 of the Report Studio User Guide. The advice given so far is assuming you have a relational package. Dimensional is another kettle of fish entirely.
Title: Re: How to Create a FROM and TO Date Prompts
Post by: v2k4u on 04 Dec 2013 03:27:19 PM
Thanks Chirs and Lynn on your suggestions, it helped me a lot and chris i was able to incorporate the prompt page with the date prompts as you have suggested and it works fine for me.... :)
Title: Re: How to Create a FROM and TO Date Prompts
Post by: willg on 05 Dec 2013 05:47:25 AM
This can also be achieved with a single prompt, if, in the prompt's properties the Range is set to 'Yes' and Multi-select to 'No'.
Title: Re: How to Create a FROM and TO Date Prompts
Post by: harishikon on 05 Dec 2013 12:10:58 PM
Yoy could use in_range function .


[Date] in_range ?Date?

Thank you