COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: zaith on 20 Nov 2007 10:17:05 AM

Title: TIP: Set Default Date Prompt to Day - 1
Post by: zaith on 20 Nov 2007 10:17:05 AM
Create a Date Prompt with ID 'PromptDate'
Insert HTML Item in prompt page.
inner HTML Item insert:
Quote
<script language="javascript">
var dDate = new Date();
//Subtract one day
dDate.setDate(dDate.getDate()-1);
//setValue adjust current date in prompt
pickerControlPromptDate.setValue(getFormatDate(dDate, 0 , 'YMD'));
</script>

All Done. You give default prompt for Previous Day
Title: Re: TIP: Set Default Date Prompt to Day - 1
Post by: djknuddel on 19 Aug 2008 09:53:22 AM
I have done so and get the error message:

'pickerControlPromptDate' is not defined.

What do you mean with ID? The name or the parameter of the prompt? I have changed the name of the prompt to "PromptDate".