COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: tushar gaurav on 14 Dec 2021 12:27:46 AM

Title: How to give current date as default selection in value prompt in Reports
Post by: tushar gaurav on 14 Dec 2021 12:27:46 AM
Hi,

I am using value prompt for date in my report and I need to have  current date as the default selection.
Can you please let me know how to achieve this scenario.

Thanks,
Tushar
Title: Re: How to give current date as default selection in value prompt in Reports
Post by: dougp on 14 Dec 2021 11:17:08 AM
First, why a value prompt and not a date prompt?

You'll need to use JavaScript.  IBM's Scriptable Reports (https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/index.html) page explains how to use JavaScript in Cognos Analytics.