Being authorize for report. [message #157315] |
Wed, 01 February 2006 09:43 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
sharma.radha
Messages: 59 Registered: August 2005 Location: mumbai
|
Member |
![123](/forum/theme/orafaq/images/icq.png)
|
|
Hi,
I have a form based on employees table i placed a button on it which runs the report(payslip)
by taking the paramater from the form.
It takes Employee_id as parameter.
But i want that an employee can see only his report(payslip).
But can see all the records of the other employees apart from their payslips.
Waiting for reply.
Thanks
Radha
|
|
|
Re: Being authorize for report. [message #157336 is a reply to message #157315] |
Wed, 01 February 2006 12:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
RJ.Zijlstra
Messages: 104 Registered: December 2005 Location: Netherlands - IJmuiden
|
Senior Member |
|
|
Radha,
Consider giving the report the parameter 'P_User'. When you call the report from Forms, fille this parameter with USER. When you
have some table with user <-> employee nr in it, it is easy to assure that the USER only sees his own employee nr stuff.
HTH,
|
|
|
Re: Being authorize for report. [message #157372 is a reply to message #157315] |
Thu, 02 February 2006 00:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vban2000
Messages: 207 Registered: March 2005
|
Senior Member |
|
|
Hi sharma
you only want employee see his own payslip on report or also wanted employee to see his own record only. for example, can normal employee see other people's salary, personal details...
If you want to implment in the way that only authorized person, such as payroll officer can see 'all' or sections of employees. you might want to consider using VPD - Virtual Private Database..
Regards
AnDy
|
|
|
Re: Being authorize for report. [message #157687 is a reply to message #157315] |
Fri, 03 February 2006 19:35 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
M0nst3r
Messages: 38 Registered: February 2006 Location: Wherever the Money Is
|
Member |
|
|
Assuming the data is normalized and the Pay table is separate from other employee information tables, the best solution is to modify your report query's WHERE clause to filter out any records that don't belong to the current user.
WHERE employee_id = USER;
If your table combines public and private information in a single table, you'll need to use DECODE's in the SELECT statement to exclude values.
SELECT employee_name, DECODE(employee_id, USER, salary, NULL), job_title...
|
|
|