Oracle Report issue [message #354185] |
Thu, 16 October 2008 21:52 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sg52
Messages: 7 Registered: October 2008
|
Junior Member |
|
|
Hi,
I am using oracle reports with oracle 9i.
I am using two reports and one links with other through a hyperlink within the first report.
The first report has the following sql:
Select first_name, last_name
from employees
where employee_id = :emp
Now, If first_name is 'Steve', i want to pass 'Steve1' to other report as a parameter.
I am trying to define a user parameter (new_first_name) and putting a
if condition which can solve this purpose.
if :first_name = 'Steve' then
:new_first_name := 'Steve1';
else
:new_first_name := :first_name;
end if;
But unfortunately, i dont know where to put this sql.
I have tried in before report trigger, validation trigger and every possible place
where i can think of, but all of them give me one error or the other.
I wanted to know how should i solve this problem?
Am i missing something like where to put this code or you think it can be done via different approach?
Kindly help.
|
|
|
Re: Oracle Report issue [message #354213 is a reply to message #354185] |
Fri, 17 October 2008 01:08 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
How about creating a FORMULA column which would contain the code (IF-THEN-ELSE) you've written? You'd then use this newly created formula column as a parameter for the second report, instead of the "original" first name column's value.
|
|
|