Home » Developer & Programmer » Forms » Being authorize for report.
Being authorize for report. [message #157315] Wed, 01 February 2006 09:43 Go to next message
sharma.radha
Messages: 59
Registered: August 2005
Location: mumbai
Member

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 messageGo to next message
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 messageGo to next message
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
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...
Previous Topic: Screen asks do you want to commit records?
Next Topic: option buttons
Goto Forum:
  


Current Time: Fri Sep 20 07:19:08 CDT 2024