Submitted by Umesh Ashok & Garima Bhatia, Tata Consultancy Services
The purpose of this technique is to disable the selection of weekends in the calendar prompt.
- Launch Report Studio using the GO Sales and Retailers package.
- Select List Report.
- Create a Prompt Page.
- In the Prompt Page, drag and drop a text box prompt and select radio button - create a new parameter and click Finish.
Name the text box prompt as text_box and change the Visible property to No.
- In the Prompt Page, drag and drop 3 HTML items, one before and two after the text box prompt as shown below.
- Double click the first HTML Item and type-in HTML code as <span id=activity_dates>
- Double click the second HTML Item and type-in HTML code as </span>
- In the Report Page, drag and drop the query item Order date from query subject Orders.
- Change the Order date, Data Format to Date/Time and select the pattern as dd-mm-yyyy.
- Open Query Explorer and apply detail filter on Order date as [Order date]=to_date(?Parameter1?,'dd-mm-yyyy') and modify the usage as Optional.
- Execute the report.
Notice that the Calendar Prompt in the prompt page will not allow you to select Saturday and Sunday.
This report has been tested in Cognos 8.4Downloads