Manipulating Date Time control
There is a report that allows users to filter on Shipment Date Time using Date Time control. By default, Cognos selects current date and midnight as the date and time.
Report Studio allows you to override this with another static default value. However, business usually runs the report for the end of previous business day (5 PM).
In this recipe, we will learn how to change the default date and time for a Date Time control to the end of the previous business day.
Getting ready
Create a dummy report that shows sales quantity by shipment day. Define filter on shipment day.
How to do it...
We will start by adding a date and time control to the report. For that add a new prompt page.
From insertable objects, drag Date & Time Prompt on the prompt page. Connect it to the Shipment Day filter using appropriate parameter in the prompt wizard.
Now select the prompt and set its Name property to shipmentDate.
Now add an HTML item to the prompt footer after the Finish button...