How to create a Calendar picker and use it your Webi report

Source : Support Need4Viz — KB #69 — Category : 2. Setting and usage

Symptom

  • Create a calendar picker.
  • Affect the result of the selection in a Webi variable.
  • Use this variable as a filter

Environment

  • SAP BusinessObjects Business Intelligence Platform : all 4.2 & 4.3 Webi versions
  • Need4Viz : all versions

Procedure

The following example is gived for a range of 2 selected dates. The same behavior can be achieved for only 1 date selection.

  • Create a Webi report with bloc
  • Create an empty "Date_From" variable [image: image]
  • Create a second emply "Date_To" variable
  • Create the Calendar Picker element with the "Date_From" and "Date_To" variables as input [image: image]
  • If you need to filter your report based on days, set the element as following (change if you need to filter based on another kind of period) : [image: image]
  • Now you can select your dates in the calendar, it will affect the variables : [image: image]
  • Now you can add a filtered variable in your Webi report : [image: image]
  • then you can filter your different report elements with the created filtered variable : [image: image]

Depending on the kind of period selected (days, months, time…), the result sent to the Webi variables will be formated differently :

  • Day → YYYY-MM-DD
  • DayTime → YYYY-MM-DD T HH:MI
  • Time → HH:MI
  • Month → YYYY-MM
  • Week → YYYY- W WK