call data from 2nd from to 1st form [message #417418] |
Sat, 08 August 2009 02:04 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
kame
Messages: 69 Registered: July 2009
|
Member |
|
|
I have 2 forms
one form have a button to call 2nd form
when I click on button (form 1)
I create a button in form 1 the code is
call_form('so_view01',no_hide);
------------- update variable from 2nd form into form 1 ----------
:masterdo.sono := :global.sono;
:masterdo.sodate := :global.sodate;
:masterdo.perscode := :global.perscode;
:masterdo.persname := :global.persname;
:masterdo.commission := :global.commission;
:masterdo.netrate := :global.netrate;
message ('Main'||:global.itemname);
message ('...');
BEGIN
GO_BLOCK('do_detail');
LOOP
:do_detail.itemcode := :global.itemcode;
:do_detail.itemname := :global.itemname;
:do_detail.itemunit := :global.itemunit;
:do_detail.dorate := :global.sorate ;
:do_detail.doqty := :global.soqty;
:do_detail.disc_pers:= :global.disc_pers;
:do_detail.disc_amount:= :global.disc_amount;
:do_detail.tax_perc:= :global.tax_perc;
:do_detail.tax_amount:= :global.tax_amount;
:do_detail.netamount:= :global.netamount;
exit when :system.last_record = 'TRUE' ;
NEXT_RECORD;
END LOOP;
END;
the button open form and show the record in master detail
when I click on one record it has 1 master and 2 detail record
all the record I save in global variable successfully.
in 2nd form I use this button
---------------- Master View--------------
:global.sono := :detailso_view.sono;
:global.sodate := :detailso_view.sodate;
:global.perscode := :detailso_view.perscode;
:global.persname := :detailso_view.persname;
:global.commission := :detailso_view.commission;
:global.netrate := :detailso_view.netrate;
------------- detail View--------------
declare
begin
go_block('masterso_view');
first_record;
loop
:global.itemcode := :masterso_view.itemcode;
:global.itemname := :masterso_view.itemname;
:global.itemunit := :masterso_view.itemunit;
:global.itemname := :masterso_view.itemname;
:global.sorate := :masterso_view.sorate;
:global.soqty := :masterso_view.soqty;
:global.disc_pers := :masterso_view.disc_pers;
:global.disc_amount := :masterso_view.disc_amount;
:global.tax_perc := :masterso_view.tax_perc;
:global.tax_amount := :masterso_view.tax_amount;
:global.netamount := :masterso_view.netamount;
message ('View'||:masterso_view.itemname);
Exit When :System.Last_Record = 'TRUE';
next_record;
end loop;
end;
Do_Key ('Exit_Form');
when I exit this form I want that all the record will show at in form 1 (master detail)
why only single record showing in form 1 detail block.(see from 1 button code)?
|
|
|
Re: call data from 2nd from to 1st form [message #417437 is a reply to message #417418] |
Sat, 08 August 2009 10:23 ![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) |
![](/forum/images/custom_avatars/67693.png) |
saadatahmad
Messages: 452 Registered: March 2005 Location: Germany/Paderborn
|
Senior Member |
![saadatahmad](/forum/theme/orafaq/images/yahoo.png)
|
|
hi,
Your question is confusing. What I understood from it is that you want to copy all the detail records from one form and paste them to the other form. From your code, you'll get only one record in your global variables because a global variable can hold one value only at any time. You're getting the last record values only in your global variables. That is why you are getting only one record in other form.
regards,
Saadat Ahmad
[Updated on: Sat, 08 August 2009 10:24] Report message to a moderator
|
|
|
|
|
Re: call data from 2nd from to 1st form [message #417564 is a reply to message #417543] |
Mon, 10 August 2009 05:02 ![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) |
kame
Messages: 69 Registered: July 2009
|
Member |
|
|
I have 2 form
1st form call 2nd form
2nd form have 2 datablock master and detail
when I click on any record support record no 1
record no 1 has 1 record in master and 2 records in detail
I want to copy master detail record from from 2 to form 1.
|
|
|
|
|
|