Home » Developer & Programmer » Reports & Discoverer » By default pervious day date on report 6i (Report bulider 6i)
By default pervious day date on report 6i [message #690347] Mon, 12 May 2025 00:02 Go to next message
Salehin
Messages: 63
Registered: March 2013
Location: Chittagong, Bangladesh
Member
Hello dear,
Can you please help I am a newbie in this forum,
I am using report developer 6i and I have to print some report for my office. Running my report I have to input previous day date every time, is there any solution that can auto fill my date box by previous day?

I attach an image my report file.

Thanx in advance....
  • Attachment: report.png
    (Size: 44.46KB, Downloaded 63 times)
Re: By default pervious day date on report 6i [message #690350 is a reply to message #690347] Wed, 14 May 2025 12:30 Go to previous message
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.
Previous Topic: Oracle Reports
Goto Forum:
  


Current Time: Wed Jun 25 03:04:59 CDT 2025