Home » Developer & Programmer » Reports & Discoverer » One :parameter but two fields in a table.
One :parameter but two fields in a table. [message #153358] Sun, 01 January 2006 00:21 Go to next message
hudz
Messages: 4
Registered: December 2005
Junior Member
Hi,

I'm using Oracle Report 9i.

I have one parameter input. The parameter is VARCHAR2. How can I insert two kind of input into one parameter?

Is this code correct?

==========================
this code is at Data Model
==========================

.
.
where
table1.Passport in (:Passport , table1.NRIC=:Passport)

OR
=====================================
this code is at BEFORE REPORT trigger
=====================================

function BeforeReport return boolean is
Passport_param number;
begin
select count(*) into Passport_param from table1 where table1.NRIC = :Passport;
if Passport_param is NULL then
table1.Passport = :Passport; //this line is wrong. I don't know how pass the passport into table1.Passport field for checking.

else
return (:Passport);
end if;
return (TRUE);
end;

-------------
at Data Model
-------------
.
.
where
table1.NRIC = :Passport;

*in the second code, parameter :Passport is at system where user insert their Passport whereas :Passport2 is only at Report and not displayed on system.

p/s : My client want like that.. Neutral


Thank you.
Re: One :parameter but two fields in a table. [message #153454 is a reply to message #153358] Mon, 02 January 2006 09:44 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I didn't check your code carefuly, but I *think* that changing trigger type might help. Parameter value is not known during execution of BEFORE REPORT trigger; try to change it to AFTER PARAMETER FORM trigger, as - during its execution - parameter value should be set.
Previous Topic: Problem in displaying Page Number
Next Topic: Report not showing next page
Goto Forum:
  


Current Time: Tue Nov 26 10:50:29 CST 2024