Home » Developer & Programmer » Forms » tabular via list item
tabular via list item [message #332336] Tue, 08 July 2008 04:13 Go to next message
ambet_epi
Messages: 5
Registered: May 2008
Junior Member
Hello.. Smile

Can you guys please help me how to display data/data's in tabular form via list item after pressing or generating the button.

Thanks
ambet
Re: tabular via list item [message #338741 is a reply to message #332336] Tue, 05 August 2008 20:43 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem yet?

David
Re: tabular via list item [message #340540 is a reply to message #338741] Wed, 13 August 2008 04:25 Go to previous messageGo to next message
ambet_epi
Messages: 5
Registered: May 2008
Junior Member
Not yet Sir David. Please help.. How can i display all the records in my tabular/table? When i generate the execute button, the table shows all the records that i have needed but,all of them inserted or displayed in the same line(first line) with the error message FRM-40102 Record must be entered or deleted. This is my codes:

BEGIN
GO_BLOCK('BLOCK3');
OPEN INQUIRY;
create_record;

LOOP

FETCH INQUIRY INTO lastname, firstname, middlename, contract, prod_code_product, description_product, prod_code_plantype, description_plantype, cc_code, planstatus_status, planstatus_description, lastname_sc, firstname_sc, middlename_sc, ph_pymnt_summary;

EXIT WHEN INQUIRY %NOTFOUND;
down;
:block2.txt_planholders_name:= lastname||' '||firstname||' '||middlename;
:block2.txt_contract_no := contract;
:block2.txt_product_type := description_product;
:block2.txt_plan_type := description_plantype;
:block2.txt_cost_center := cc_code;
:block2.txt_sales_counselor:= lastname_sc||' '||firstname_sc||' '||middlename_sc;
:block2.txt_plan_status := planstatus_description;


END LOOP;
CLOSE INQUIRY;
END;


Waiting for your reply Sir David...

Thanks
Ambet

Re: tabular via list item [message #340563 is a reply to message #340540] Wed, 13 August 2008 05:15 Go to previous messageGo to next message
sasipalarivattom
Messages: 121
Registered: June 2007
Location: Cochin ( INDIA )
Senior Member
Hi Ambet ,

Is it a data block ?
If yes , why don't you use EXECUTE_QUERY ?

If it is only a control block , try this modifies code

BEGIN
GO_BLOCK('BLOCK3');
OPEN INQUIRY;
create_record;

LOOP

FETCH INQUIRY INTO lastname, firstname, middlename, contract,
 prod_code_product, description_product, prod_code_plantype, 
 description_plantype, cc_code, planstatus_status,
 planstatus_description, lastname_sc, firstname_sc, 
 middlename_sc, ph_pymnt_summary;

EXIT WHEN INQUIRY %NOTFOUND;

:block2.txt_planholders_name:= lastname||' '||firstname||' '||middlename;
:block2.txt_contract_no := contract;
:block2.txt_product_type := description_product;
:block2.txt_plan_type := description_plantype;
:block2.txt_cost_center := cc_code;
:block2.txt_sales_counselor:= lastname_sc||' '||firstname_sc||' '||middlename_sc;
:block2.txt_plan_status := planstatus_description;

down;

END LOOP;
CLOSE INQUIRY;
END;


Regards ,
Sasi..

[EDITED by DJM: Made displayed text narrower]

[Updated on: Mon, 18 August 2008 20:29] by Moderator

Report message to a moderator

Re: tabular via list item [message #340710 is a reply to message #340563] Wed, 13 August 2008 21:08 Go to previous messageGo to next message
ambet_epi
Messages: 5
Registered: May 2008
Junior Member
Mr. Sasi,
Sir, It didn't work. What am i going to do? Please Help...
I tried to follow your instructions. My data block(table/tabular) item property is already set to YES. But, nothings gonna happen. Still the same error.

Thanks,
Ambet
Re: tabular via list item [message #340715 is a reply to message #340710] Wed, 13 August 2008 22:22 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
My data block(table/tabular) item property is already set to YES

So it is a data block, based on a table which resides in your schema. Why would you populate it using a cursor (cursor? Where did you declare it? Where are cursor variables?)? Are you, perhaps, making simple things complicated?

Because, the most obvious solution is to press EXECUTE QUERY button and populate that block (possibly with entering certain search criteria). It is the default Forms behaviour, you don't have to code it.

If there are non-database items (such as :block2.txt_planholders_name or block2.txt_sales_counselor), fetch their values in the POST-QUERY trigger.
Re: tabular via list item [message #340726 is a reply to message #340715] Thu, 14 August 2008 00:59 Go to previous messageGo to next message
ambet_epi
Messages: 5
Registered: May 2008
Junior Member
Sir this is my complete code:

PROCEDURE PLANHOLDER_INQUIRY_PRODUCT IS
lastname VARCHAR2(80);
firstname VARCHAR2(80);
middlename VARCHAR2(80);
contract VARCHAR2(80);
prod_code_product VARCHAR2(80);
cc_code VARCHAR2(80);
description_product VARCHAR2(80);
description_plantype VARCHAR2(80);
prod_code_plantype VARCHAR2(80);
lastname_sc VARCHAR2(80);
firstname_sc VARCHAR2(80);
middlename_sc VARCHAR2(80);
planstatus_status VARCHAR2(80);
planstatus_description VARCHAR2(80);
ph_pymnt_summary VARCHAR2(80);


CURSOR INQUIRY IS
SELECT a.lastname, a.firstname, a.middlename, b.contract, c.prod_code, c.description,
d.prod_code, d.description, e.code, f.description, f.code, g.lastname,
g.firstname, g.middlename, h.status FROM planholder a, ph_contract b,
product c, plan_type d, cost_center e, plan_status f, sales_associate g,ph_payment_summary h
WHERE b.prod_code = :LIST_PRODUCT_TYPE AND a.ph_no = b.ph_no
AND c.prod_code = d.prod_code AND b.cc_code = e.code AND b.plan_type = d.code
AND b.prod_code = c.prod_code AND b.sc_code = g.sc_code AND f.code = h.status;

BEGIN

GO_BLOCK('BLOCK3');

OPEN INQUIRY;
CREATE_record;

LOOP

FETCH INQUIRY INTO lastname, firstname, middlename, contract, prod_code_product, description_product,
prod_code_plantype, description_plantype, cc_code, planstatus_status,
planstatus_description, lastname_sc, firstname_sc, middlename_sc, ph_pymnt_summary;

EXIT WHEN INQUIRY %NOTFOUND;

:block2.txt_planholders_name := lastname||' '||firstname||' '||middlename;
:block2.txt_contract_no := contract;
:block2.txt_product_type := description_product;
:block2.txt_plan_type := description_plantype;
:block2.txt_cost_center := cc_code;
:block2.txt_sales_counselor := lastname_sc||' '||firstname_sc||' '||middlename_sc;
:block2.txt_plan_status := planstatus_description;

DOWN;

END LOOP;

CLOSE INQUIRY;
END;

Thanks,
Ambet
Re: tabular via list item [message #340733 is a reply to message #340726] Thu, 14 August 2008 01:25 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, that is the procedure. Now learn how to properly format it so that it is readable (check the OraFAQ Forum Guide, test your skills in the Test forum).

However, I still don't see a reason why you chose to do it that way instead of using built-in Forms features.
Re: tabular via list item [message #340740 is a reply to message #340733] Thu, 14 August 2008 01:59 Go to previous messageGo to next message
ambet_epi
Messages: 5
Registered: May 2008
Junior Member
Sir DAVID,
Sir SASI
and
Littlefoot

I've already run my application without error.
Thank you very much. In Filipino Language, "SALAMAT NG MARAMI".. Smile


Ambet


Re: tabular via list item [message #340757 is a reply to message #340740] Thu, 14 August 2008 02:53 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happened, all of the sudden, that you made it work?
Previous Topic: Oracle forms 6i & New to forms (merged)
Next Topic: horizontal scroll bar for a tab page
Goto Forum:
  


Current Time: Mon Feb 10 00:19:11 CST 2025