Skip to Content

Using BOE, scheduling a report, how to run every day using current day as query of the data

Feb 16 at 12:02 PM


avatar image

I already set up the scheduling, but I'm struggling with the PROMPT, in there the query of the report has a field for the DATE, but only one date can be placed. Or what should I place in that field, so every day it runs the report it uses the current day, instead a fixed date.

thanks a lot, I'm so beginner in this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Joe Peters Feb 16 at 12:30 PM

There are different options, but they all require universe modification.

If the universe is unx, and the prompt is a predefined condition, you can use a formula for the default value. That formula can be today's date.

Or, you could just create a predefined condition that applies a condition for today (table.field=trunc(sysdate), for example). Then use that instead of the prompt.

Finally, you can use a "magic number". This requires that the field be a string rather than a date, but it allows you to specify a code or a date. For example:

table.field = case when @prompt(...) = '1' then trunc(sysdate) else to_date(@prompt(...),'mm/dd/yyyy')

If you respond to the prompt with a value of "1", then today's date is used. Otherwise, the input is assumed to be a date string in mm/dd/yyyy format. So, when you schedule the report, you would use a value of "1". But refreshing interactively you could either use the "1" code or a specific date.

10 |10000 characters needed characters left characters exceeded