Home » Developer & Programmer » Forms » how pass all parameter (ORACLE FORMS 6i ,WINDOW 7 ULTIMATE(32),11G database R2)
how pass all parameter [message #629504] Wed, 10 December 2014 01:07 Go to next message
kilimanjaro
Messages: 151
Registered: May 2009
Location: Tanzania
Senior Member
Hello friends

I have a report which users enters employee number then it runs OK.
My problem is I want the same report to have an option of All (*) if the user want the report of all employees. Thank you.
Re: how pass all parameter [message #629507 is a reply to message #629504] Wed, 10 December 2014 01:19 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Let's suppose that parameter name is PAR_EMPNO. The easiest option is to leave it empty if you want to return all employees, because WHERE clause looks like this:
where ...
  and (e.empno = :par_empno or :par_empno is null)

If you pass "All (*)" (or anything like that), you have to write some code which will return what you want (and that is, generally speaking, more complex than passing nothing). You could use AFTER PARAMETER FORM trigger and check
if :par_empno = 'All (*)' then 
   :par_empno = null;
end if;
and still use the same WHERE clause I suggested earlier.
Re: how pass all parameter [message #629513 is a reply to message #629507] Wed, 10 December 2014 03:56 Go to previous message
kilimanjaro
Messages: 151
Registered: May 2009
Location: Tanzania
Senior Member
Hello Littlefoot

Thank you very much .It has worked .Thank you.
Previous Topic: Trim functionality in Oracle forms 10g
Next Topic: form session
Goto Forum:
  


Current Time: Thu Apr 25 07:07:57 CDT 2024