Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass a Char ('F') from Report triggers in Oracle Reports

Status
Not open for further replies.

MarcelBeals

Programmer
Mar 29, 2000
18
CA
Hello,
I am new to Oracle 8 and would like to know if anyone has ever come across this problem:
Just before the sql is executed i want to pass it part of the SQL statement:
function BeforeReport return boolean is

begin
:p_PrevYear := :p_CurrYear - 1;

IF :p_Gender_Selection = 'Female' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || 'F';
ELSIF :p_Gender_Selection = 'Male' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || 'M';
ELSIF :p_Gender_Selection = 'Unknown' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || 'U';
ELSE
:p_Where_Clause := ' ';
END IF;

return (TRUE);
end;

Marcel.
 
You can try this:

begin
:p_PrevYear := :p_CurrYear - 1;

IF :p_Gender_Selection = 'Female' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || ''F'';
ELSIF :p_Gender_Selection = 'Male' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || ''M'';
ELSIF :p_Gender_Selection = 'Unknown' THEN
:p_Where_Clause := 'AND Warehouse.Gender_CD := ' || ''U'';
ELSE
:p_Where_Clause := ' ';
END IF;

return (TRUE);
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top