Home » Developer & Programmer » Forms » Find option in forms ??
Find option in forms ?? [message #112104] Wed, 23 March 2005 01:21 Go to next message
theone
Messages: 6
Registered: March 2005
Location: Jabalpur
Junior Member
Hi,

In oracle forms if we want to search datas by using only one
item of it,
How we can make such arrangment.
for exp : if we want to search employee details from emp table
we create one canvas, within that we place one text item and one button.
now when ever i press this button after writing the employee number, another canvas will be generated with the corresponding
details of that employee.

what should be the approach.
should i use parameter,or master details.

plz show me the way.

bye

Abhi
Re: Find option in forms ?? [message #112173 is a reply to message #112104] Wed, 23 March 2005 08:11 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

I'll go step by step:
Create a New Form.
Create the emp Block by Data Block Wizard selecting all columns(from scott/tiger). Don't create the layout at this time do the things step by step.
Create a CNTROL Block manually.
Create two canvases.
Create a text item on CONTROL Block named v_empno.
Create two buttons on COTROL Block. BUTTON_1, BUTTON_2
Place the item v_empno on Canvas1.
Place Button_1 on Canvas1
Place the EMP block's item on Canvas2 (all except empno)
create a trigger on BUTTON_1 (When-Button-Pressed)
Code:
:GLOBAL.g_empno := :CONTROL.v_empno;
GO_BLOCK('emp');
EXECUTE_QUERY;

Open the property pallete of emp block.
Write the WHERE clause as empno = :GLOBAL.g_empno

Place the BUTTON_2 on Canvas2
Code : When-Button-Pressed
GO_BLOCK('control');
Save and run the form.
Give an empno and click the buton. You'll get the results
Hopefully you have understand upto this time how to achieve this type of functionality...
Cheers!
Previous Topic: Retrieve Images in Oracle D2K Form
Next Topic: empty value in the list item
Goto Forum:
  


Current Time: Thu Sep 19 18:16:39 CDT 2024