|
Re: By default pervious day date on report 6i [message #690350 is a reply to message #690347] |
Wed, 14 May 2025 12:30  |
 |
Littlefoot
Messages: 21825 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Newbie in this forum? Member since 2013?
Anyway: Reports 6i? An ancient piece of software ... I'm not sure I'd find computer which still runs it. I've got Reports 10g on a virtual machine, tested it but can't guarantee this works in 6i as well - see if it helps.
Sample query is a simple one:
SELECT COUNT(*) FROM some_table WHERE datum = :par_datum
Builder automatically creates parameter named PAR_DATUM. Edit its properties:
- datatype = date
- input mask = dd.mm.yyyy
- initial value: leave it empty, it can't accept expressions (such as trunc(sysdate - 1))
Navigate to "Report triggers" and double-click a BEFORE PARAMETER FORM trigger. Put such a code into it:
function BeforePForm return boolean is
begin
:par_datum := trunc(sysdate - 1);
return (TRUE);
end;
Run the report; parameter form will contain yesterday's date in DD.MM.YYYY format.
|
|
|