Department wise Employee Report.
For IT Department:
Employee_Id,Last_Name,Hire_date,Salary Column will Show.
Other Column will be Hidden.
For HR Department:
Employee_Id,Salary Column will Show.
Other Column will be Hidden.
I want it will be show Hide from the database.
For this Reason i created a Setup Employee Table and I have written a code in each item in server condition-> Plsql Function Body.
Example:
For Last Name Column:
=======================
Declare
V_LAST_NAME VARCHAR2(50);
begin
if :P443_TEST_NO is not null then
select LAST_NAM
into V_LAST_NAM
from SET_EMPLOYEES
where DEPARTMENT_ID=:P443_DEPARTMENT_ID;
if V_LAST_NAME = '1' then
return true;
else
return false;
end if;
end if;
end;
For Salary Column:
=======================
Declare
V_SALARY VARCHAR2(50);
begin
if :P443_TEST_NO is not null then
select LAST_NAM
into V_SALARY
from SET_EMPLOYEES
where SALARY_ID=:P443_SALARY;
if V_SALARY = '1' then
return true;
else
return false;
end if;
end if;
end;
But the problem is that I feel different Server Side Condition (Plsql Function Body) in each column.I want to do it by a function/Procedure. How Can i Do it?
afzal
HI
APPLY SERVER SIDE CONDITION FOR EACH COLUMN LIKE------- OR CHANGE ACCORDING TO YOUR REQUIREMENT
1.column name ==> Employee_Id
serverside condition ==> plsql funtion body
2. column name ==> Last_Name
serverside condition ==> plsql funtion body
3.column name ==> Hire_date
serverside condition ==> plsql funtion body
4.column name ==> Salary
serverside condition ==> plsql funtion body
Shimul
Sorry I don't want to run this code (Hard Code) from all items. If I have 100 columns then I have to use this hard code 100 times. This will make my software much slower. I want to call it by one function. But problem is Function return only first column result.
afzal
Hi,
you donot require to create items for each column, only one item P443_DEPARTMENT_ID
you have to create , and apply sever side condition for each column based on your department_id