Home » Developer & Programmer » Reports & Discoverer » Group Level Triggers
icon5.gif  Group Level Triggers [message #260292] Sat, 18 August 2007 02:42 Go to next message
prachi.mgorwadkar
Messages: 75
Registered: May 2007
Location: Pune
Member
Hello,

I have one query as:

I create one very simple report with a query -
select * from emp where job like :ejob;

I want to put a condition with hiredate for a particular Employee, as

if hiredate is null then do not display that whole row of the related employee.

How can I do it?

I have used cursor, but it does not work.
Because in Reports, trigger is nothing but a function form. That must return something.

And as it RETURNs something, the focus goes out of the function & cursor remains open.

Thanks in advance,
-P
Re: Group Level Triggers [message #260319 is a reply to message #260292] Sat, 18 August 2007 06:36 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
You can return FALSE in the format trigger of the repeating frame, when the condition matches. Otherwise return TRUE.

Edit: No idea why do you want to use a cursor, instead of an if clause.

By
Vamsi

[Updated on: Sat, 18 August 2007 06:37]

Report message to a moderator

icon5.gif  Re: Group Level Triggers [message #260506 is a reply to message #260319] Mon, 20 August 2007 03:19 Go to previous messageGo to next message
prachi.mgorwadkar
Messages: 75
Registered: May 2007
Location: Pune
Member
Hello,

Thanks for the reply.
But it does not work. As I explained earlier.

And the reason I am using cursor is, I want to check whether this is possible with the cursors?

Thanks,
-P

Re: Group Level Triggers [message #260525 is a reply to message #260506] Mon, 20 August 2007 04:13 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I still can't understand why you have to use a cursor; in a report like yours, use repeating frame's FORMAT TRIGGER as Vamsi suggested.
function R_G_EMPNOFormatTrigger return boolean is
begin
  return (:hiredate is not null);
end;
Previous Topic: dot matrix printing
Next Topic: graphics builder
Goto Forum:
  


Current Time: Fri Dec 06 23:10:17 CST 2024