Monday, 23 September 2019

Default values in BI reports

Oracle provides some functions for default values for date fields. Below are some supported functions. The below details are from Oracle support note.
Enter one of the following functions using the syntax shown to calculate the appropriate date at the scheduled runtime for the report:

{$SYSDATE()$} - current date (the system date of the server on which BI Publisher is running)

{$FIRST_DAY_OF_MONTH()$} - first day of the current month

{$LAST_DAY_OF_MONTH()$} - last day of the current month

{$FIRST_DAY_OF_YEAR)$} - first day of the current year

{$LAST_DAY_OF_YEAR)$} - last day of the current year

The date function calls in the parameter values are not evaluated until the report is executed by the Scheduler.

You can also enter expressions using the plus sign "+" and minus sign "-" to add or subtract days as follows:

{$SYSDATE()+1$}

{$SYSDATE()-7$}

For our example, to capture data from the previous week, each time the schedule runs, enter the following in the report's date parameter fields:

Date From: {$SYSDATE()-7$}

Date To: {$SYSDATE()-1$}

1 comment:

  1. Good Article, Alots of information provided, Thanks for sharing this information.
    Oracle Fusion SCM Training

    ReplyDelete

Integrations Lead - Lessons learnt

 Integrations have been my passion for a while but like anything tech there is no credit given when things go right but always heaps of pres...