Add a variable prompt calendar

In Interactive Custom Report Writer (ICRW), you typically use a text field to set a variable prompt for a date. Then when the user runs the report, they enter the date in a text field. The ability to select a date from a calendar is not typically available for variable prompts.

There's a workaround for this shortcoming, however. This topic shows you how to include a calendar widget for a variable prompt date.

Add a calendar widget for a variable prompt date

A between option is not available for variable prompts. To select two different dates, such as a starting date and an ending date, you need to create two different prompts.

The following task shows you how to add a calendar widget for a variable prompt that requires a date.

  1. Open an ICRW report to Edit, and go to the Prompts tab.
  2. Select the New icon and choose Variable Prompt.
  3. Enter a Name for the Presentation Variable. Then enter a Title and (optionally) a Description.
  4. Change the User can select from option to a Choice List.
  5. From the Choice List Values dropdown menu, choose All Column Values, then select the fx icon (to the left of the Select Column button).
  6. In the calculation field, enter a date string using the following format, including the word DATE and the two apostrophes: DATE '1999-12-31'
  7. Select OK to close the Edit Column Formula dialog.
  8. On the New Prompt dialog, expand the Options section, and make sure that the Variable Data Type field is set to Date. Then select OK to save and close the dialog.
  9. Double-click the new prompt from the list and change Choice List Values to Custom Values. Do not add any custom values to the list.
  10. Change User can select from to Calendar and once again set the Variable Data Type to Date. Then select OK to save and close the dialog.

    Now when a user runs the report, they can select the calendar icon at the prompt and choose a date from a calendar.
  11. A calendar widget that allows you to select a date for a variable prompt.