If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

HOW TO RESTRICT FUTURE DATES IN DATE PROMPT IN COGNOS

Started by Gnani, 22 May 2015 09:27:14 AM

Previous topic - Next topic

Gnani

HOW TO RESTRICT FUTURE DATES IN DATE PROMPT IN COGNOS

I have a requirement which says...
Restrict the user to select Future date in Data prompt.
Eg; if today is 22nd May 2015, then user should not be allowed to select more than today's date. 23rd May or so...

Thanks in Advance

Lynn

WHAT TYPE OF DATA SOURCE DO YOU HAVE? RELATIONAL OR DIMENSIONAL? WHY ARE WE SHOUTING?

What type of prompt control are you using? If it is a calendar control then you can't really prevent them from picking any date they want. If you are giving a pick list of dates generated by a query then you can limit the contents of the list by including a filter, but the type of data source you have will affect answers on the best way to accomplish this.

You could also consider rendering a page that indicates they've made an invalid selection rather than running the report with the prohibited date selection.

MFGF

Quote from: Lynn on 22 May 2015 10:08:09 AM
WHAT TYPE OF DATA SOURCE DO YOU HAVE? RELATIONAL OR DIMENSIONAL? WHY ARE WE SHOUTING?

PARDON?
Meep!

bdbits

WHAT LYNN SAID. OR IF YOU HAVE SOME JAVASCRIPT SKILLS, YOU CAN ALSO LINK TO CUSTOM VALIDATION ON THE PROMPT PAGE VIA THE PROMPT API. BUT YOU WILL NEED TO HAVE SOME JAVASCRIPT SKILLS.

I THINK GNANI MEANT ALL THE CAPS AS A SORT OF TITLE. I AM USING CAPS FOR MFGF. CAN YOU HEAR ME NOW?  8)

Gnani

It is relational model and datasource is oracle. You could restrict the future date from calendar prompt only. We have option as last date for Date prompt. That actually works for fixed mentioned date. I want this to be dynamic.



cognos810

Hello Gnani,
If thats the case then, your only non-javascript option is to take the user to a page that is rendered conditionally with a message on it, something like "Cannot choose date greater than today", based on the date parameter value selected, and which also has a "Back" button to take the user back to the prompt page to rectify the date value, as Lynn suggests.
Of course, there is the javascript route as per bdbits.

-Cognos810

Gnani

Thanks Lynn and Cognos810 for your replies..

We don't need to popup something which says.."Can't choose date greater than today".
We can restrict future date for date prompt but it works for only today (hard coded). I want this to be dynamic.

Thanks in advance