Home » Developer & Programmer » Reports & Discoverer » Problem in Oracle Report
Problem in Oracle Report [message #209449] Thu, 14 December 2006 22:03 Go to next message
ambreen
Messages: 9
Registered: October 2006
Location: Pakistan
Junior Member

I have to disable leave information of employee at run time if the employee leave record is not present .I search the record using department id.
Re: Problem in Oracle Report [message #209491 is a reply to message #209449] Fri, 15 December 2006 03:00 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What is "leave information" and "leave record"?

This will be a blind-shot answer, but perhaps you'll get what I mean: it seems that you are querying employees and departments and want to display data about employees in each department, but would like to omit employee which lacks some information (your "leave records").

If so, you could try to use EXISTS (or NOT EXISTS, whichever suits you better) to distinguish one group of employees from the other. Or, omit outer join (if you are using it).

Or, even better, post your queries (.RDF?) so that we could see what you are trying to do.
Re: Problem in Oracle Report [message #209618 is a reply to message #209449] Fri, 15 December 2006 22:36 Go to previous messageGo to next message
ambreen
Messages: 9
Registered: October 2006
Location: Pakistan
Junior Member

the report contains employee,leave,leave enhancement,job detail infortmation .I use the code like this

function CF_5Formula return Number is
cnt number;
begin
select count (*) into cnt
from leaveencashment where assignment_id_pk
in ( select assignment_id_pk from assignments where deptid=:departmentid);

return cnt;
end;
Please tell that if the record for leave enchancement is not present than the leave protion become disappear

Re: Problem in Oracle Report [message #209650 is a reply to message #209618] Sat, 16 December 2006 06:49 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
Hi ambreen

So what your assignments table is used for . If it stores the information about the departments ? You dont want to display the details of the employees whose leave details is not present ? Is it then I think you take out the value present in leave the detail table or each employee and put a where condition i.e null or not null.

I will help you if you send me the .rdf / query?

Bye
Ashu
Re: Problem in Oracle Report [message #209651 is a reply to message #209618] Sat, 16 December 2006 06:52 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I think I understand now.

Write a format trigger (can be found at Property Inspector for the "leave" frame) and make it look like this:
function leave_format_trigger 
  return boolean is
begin
  return (:cf_5 > 0);
end;
If number of leave records is zero (0), this trigger will return FALSE and the whole frame (including its objects) will not be displayed.
Re: Problem in Oracle Report [message #209652 is a reply to message #209651] Sat, 16 December 2006 06:58 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
yes LF you are right but why OP is so slow .
Previous Topic: Text between panels break and printed on multiple pages
Next Topic: Multiple reports in single report (was Migrated forms property)
Goto Forum:
  


Current Time: Tue Nov 26 15:30:43 CST 2024