Previous Topic

Book Contents

Book Index

Next Topic

Report parameters

The reports can use parameters in two ways:

  • internally – for master-details reports (using sub-reports)
  • externally – to query user for an input and use it to filter data

For example, to display Services valid in a specific date interval, the following query would be used for the data set:

SELECT

"PUBLIC"."SERVICES"."SERVICENAME" AS servicename,

"PUBLIC"."SERVICES"."STATUS" AS status,

"PUBLIC"."SERVICES"."ISSERVICETEMPLATE" AS isServiceTemplate

FROM

"PUBLIC"."SERVICES"

WHERE

NOT "PUBLIC"."SERVICES"."SERVICESID" IS null

AND "PUBLIC"."SERVICES"."VALIDFROM" > ${period_from}

AND "PUBLIC"."SERVICES"."VALIDFROM" < ${period_to}

ORDER BY

"PUBLIC"."SERVICES"."SERVICENAME" ASC

The query contains two parameters – period_from and period_to.

Next, right-click inside the 'Data' tab of the 'Report Explorer' and call the 'Add Parameter…' function.

Help Image

Specify the two parameters

First parameter:

  • Name = 'period_from'
  • Label = 'Period from:'
  • Value Type = 'Date'
  • Data Format = 'yyy/MM/dd'
  • Default Value Formula = '=NOW()'

The remaining fields can remain empty.

Second parameter:

  • Name = 'period_to'
  • Label = 'Period to:'
  • Value Type = 'Date'
  • Data Format = 'yyy/MM/dd'
  • Default Value Formula = '=NOW()'

Again, the remaining fields can remain empty.

Clicking the preview button will display an empty sheet as the 'period_from' and 'period_to' parameters were initialized by the current timestamp (Default Value Formula = '=NOW()'). Entering a valid interval should display corresponding services.

See Also

Report Creation

Page Setup

Data Set Creation

Report design

Localization

Report Stylesheet