Loading...

Date Range Input Control for Build Your Own Reports

Date ranges allow the user to enter one date and time or a range of dates and times.

Examples

Last N

Allows the user to enter the number of specified time units to filter report data. For example: Last 7 Days. This image is an example of a Last N date range in a report:

Settings

To display a Last N date range, configure the following settings on the Edit Report Input dialog box.

Setting

Selection

Input Variable

The name you will use as a parameter in the report query.

Display Name

Then name that will appear as a label for the input in the report.

Input Variable Type

DateRange

Input Control Type

DateRange

Hide Input

Cleared

Required

Optional

Default Value

7

Options

Last N

Allowed Units

  • Days
  • Weeks
  • Months

The following image is an example of the configured settings.

Next N

Allows the user to enter the number of specified time units to filter report data. For example, Next 3 Months. Use input for trending reports. This image is an example of a Next N date range in a report:

Settings

To display a Next N date range, configure the following settings on the Edit Report Input dialog box.

Setting

Selection

Input Variable

The name you will use as a parameter in the report query.

Display Name

Then name that will appear as a label for the input in the report.

Input Variable Type

DateRange

Input Control Type

DateRange

Hide Input

Cleared

Required

Optional

Default Value

3

Options

Next N

Allowed Units

  • Months
  • Years

The following image is an example of the configured settings.

Custom Range With No Default Value

Allows the user to enter a Start Date and End Date from a calendar to filter the report data. This image is an example of a Custom date range in a report:

Settings

To display a Custom date range, configure the following settings on the Edit Report Input dialog box.

Setting

Selection

Input Variable

The name you will use as a parameter in the report query.

Display Name

Then name that will appear as a label for the input in the report.

Input Variable Type

DateRange

Input Control Type

DateRange

Hide Input

Cleared

Required

Optional

Default Value

Blank

Options

Custom Range

Allowed Units

All cleared

The following image is an example of the configured settings.

Custom Range With A Default Value

You can also configure a custom date range with a default value, such as the current day, by using PnYnMnDTnHnMnS from the XSD (XML Schema Definition) Duration data type. This image is an example of the custom date range with a default value in a report:

Settings

In this example, the default date and time is today's date, two hours before the current time. Configure the following settings on the Edit Report Input dialog box:

Setting

Selection

Input Variable

The name you will use as a parameter in the report query.

Display Name

Then name that will appear as a label for the input in the report.

Input Variable Type

DateRange

Input Control Type

DateRange

Hide Input

Cleared

Required

Optional

Default Value

-PT2H

Options

  • Custom Range
  • Include Time Selection

Allowed Units

  • Minutes
  • Hours
  • Days
  • Weeks
  • Months
  • Years

The following image is an example of the configured settings.

Custom Range Example Query

To use the custom date range input, create a parameter for the date range input. Configure the following settings on the Edit Data Set dialog box:

Setting

Selection

Parameter

Input variable that you configured in the Edit Report Input dialog box.

Type

DateRange

Multi

Cleared

Required

Cleared

Value

=input.duration

The following image is an example of the configured settings.

Then, add the parameter as part of a where clause in the report query in the Query box on the Edit Data Set dialog box.

where startdate >=@duration_from and enddate <= @duration_to

The following image is an example of the configured settings.

Include Time Selection

When a Custom date range is selected, allows the user to also select a specific time from a list. This image is an example of a Custom date range with a Time Selection in a report:

Settings

To display a Custom date range with a Time Selection, configure the following settings on the Edit Report Input dialog box.

Setting

Selection

Input Variable

The name you will use as a parameter in the report query.

Display Name

Then name that will appear as a label for the input in the report.

Input Variable Type

DateRange

Input Control Type

DateRange

Hide Input

Cleared

Required

Optional

Default Value

Blank

Options

  • Custom Range
  • Include Time Selection

Allowed Units

All cleared

The following image is an example of the configured settings.

Associated Input Variables

  • DateRange

 

Last modified: 3/1/2018 6:45:12 PM