Anda di halaman 1dari 3

Here create two buttons save and exit.

Double click on it and


change it’s name save and exit. After it left click on save button
and press F11 and write a trigger here.

Commit_form;
Clear_form;

This trigger save your record and clear the record.

Next trigger on exit button.

Exit_record;

This trigger exit out from the form.

For scroll bar with the reptdtl open the object navigator click on
the rcptdtl properties click on yes in front of scroll of bar and
choose the canvas2.
First of all we select the display item button and draw in front
dcode. Change its name dname and give it’s data base negative in
the properties of dname. Same process use for sname and
iname.In iname we just change the block name rcptdtl.
For of all we create the trigger on the dcode for show the name in
dname column.

Select dname into rcptmst. Name form dept


Where dcode=:rcptmst.dcode;
Exception when no_data_found then
:rcptmst.dname:=’nill’;

This trigger is use for scode.

Select sname into :rcptmst.sname from supplier


Where scode=:rcptmst.scode;
Exception when no_data_found then
:rcptmst.sname:=’nill’;

This trigger is use for icode.

Select iname into :rcptdtl.iname from item


Where icode=:rcptdtl.icode;
Exception when no_data_found then
:rcptdtl.iname:=’nill’;

This trigger is use to rate for amount.

:rcptdtl.amt:=nvl(:rcptdtl.rate,0)*nvl(:rcptdtl.qty,0);
This trigger is use for rate. This trigger multiply the rate with qty
and give the answer in the amount column.

Begin
Select max(rno)into:rcptmst.rno from rcptmst;
Exception when no_data_found then
:rcptmst.rno:=0;
end;

This trigger is use for increment show.

Select nvl(max(nvl(rno,0)),0)+1 into :rcptmst.rno from


Rcptmst;
Exemption when no_data_found then
:rcptmst.rno:=1;

This trigger is use for increase in the serial number.

First of all we create list of values. Start the wizard and select the
table dept and select column for get the data from SQL table of
dept, same process for supplier and for item. After create the list
of values run the program and press F9.

ALERT.
First of all we create config in the SQL. In which we create two
column sdate and edate and give limited date for alter. Then we
open the form and check the alert.
This is the alter we create in the object navigator. Now we create
the trigger on date for validation of date.
Declare
Mfdate date;mtdate date;temp number;
Being
Being
Select sdate,edate into mfdate,mtdate from config;
Exception when no_data_found then null;
End;
If :rcptmst.rdate not between mfdate and mtdate then
Temp:=show_alert(‘date”);
Raise from_trigger_failure;
End if;
End;

Anda mungkin juga menyukai