Hierarchy tree in oracle forms problem
Hello Experts,
I am new in oracle forms.I am using oracle forms 11g with weblogic server 10.3.5 at windows 7.I have two table as tbl_country and tbl_state.I have to make a hierarchy tree in oracle forms.My table structure as:
tbl_country
CREATE TABLE "SCOTT"."TBL_COUNTRY"
( "CNTRY_CODE" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(80 BYTE),
CONSTRAINT "TBL_COUNTRY_PK" PRIMARY KEY ("CNTRY_CODE")
tbl_state:
CREATE TABLE "SCOTT"."TBL_STATE"
( "SATE_CODE" NUMBER NOT NULL ENABLE,
"COUNTRY_CODE" NUMBER NOT NULL ENABLE,
"STATE_NM" VARCHAR2(80 BYTE),
CONSTRAINT "TBL_STATE_PK" PRIMARY KEY ("SATE_CODE")
CONSTRAINT "FK_CNTRY_STATE" FOREIGN KEY ("COUNTRY_CODE")
Table Date as:
insert into tbl_COUNTRY values(0,'country ');
insert into tbl_COUNTRY values(91,'HHH');
insert into tbl_COUNTRY values(72,'III');
insert into tbl_COUNTRY values(83,'JJJ');
insert into tbl_state values(1,'state',0);
insert into tbl_state values(2,'BH',91);
insert into tbl_state values(3,'CI',72);
insert into tbl_state values(4,'DI',72);
insert into tbl_state values(5,'EH',91);
insert into tbl_state values(6,'FI',72);
insert into tbl_state values(7,'GJ',83);
insert into tbl_state values(8,'HJ',83);
insert into tbl_state values(9,'IH',91);
Desired Output in oracle forms tree:
|__Country
|____HHH
|____BH
|____EH
|____IH
|____III
|__CI
|__DI
|__FI
|____JJJ
|__GJ
|__HJ
I Have tried but got no output
select
1 ,level, esm.name,NULL,to_char(esm.CNTRY_CODE)
from (SELECT c.name,c.cntry_code from TBL_COUNTRY c union all select s.STATE_NM,s.COUNTRY_CODE from tbl_state s) esm
connect by prior esm.CNTRY_CODE = esm.CNTRY_CODE
start with esm.code=0
what is going wrong here.
thank you
regards
aaditya
If you have never worked with a Forms Tree control, I recommend you look at this tutorial: How To Create a Hierachical Tree form.
Craig...
Similar Messages
-
Make an hierarchical Tree in oracle Forms 6i
Hi everybody,
I want to make an hierarchical tree. I work in Forms 6i
I create one non database block e.g. 'Bloc2' then
add hierarchical control item in that. e.g 'Menu'.
I create a record group named 'RG_DATA_TEST'
Before I use a table in this record_group.
I want a tree as this :
- Menu1
Menu1 option1
Menu1 option2
- Menu1 option3
Menu option3 Sub opt 3
+ Menu2
the table 'Menu_tree' is described' :
CREATE TABLE MENU_tree
ID NUMBER(5),
LABEL VARCHAR2(128 BYTE),
ICON VARCHAR2(40 BYTE),
MASTER NUMBER(5),
STATUS NUMBER(1) DEFAULT 1,
VALUE VARCHAR2(128 BYTE)
Here the data in the table :
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (1, 'Menu1', 'mainmenu', NULL, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (
2, 'Menu1 Option 1', 'optionmenu', 1, 1, 'Dialog11');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 3, 'Menu1 Option 2', 'optionmenu', 1, 1, dialog12');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES (4, 'Menu1 Option 3', 'optionmenu', 1, 1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 5, 'Menu1 Opt 3 Sub Opt 3', 'suboptionmenu', 4, 1, 'Dialog131');
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 6, 'Menu2', 'mainmenu', NULL, -1, NULL);
INSERT INTO MENU_tree ( ID, LABEL, ICON, MASTER, STATUS, VALUE ) VALUES ( 7, 'Menu2 Option1', 'optionmenu', 6, 1,'Dialog21');
The record_group use this instruction SELECT :
SELECT STATUS, LEVEL, LABEL, ICON, VALUE
FROM MENU_tree
CONNECT BY PRIOR ID = MASTER
START WITH MASTER IS NULL
And At the trigger When_new_form_instance , i do this code :
DECLARE
htree ITEM;
V_IGNORE number;
BEGIN
HTREE := FIND_ITEM('BLOC2.MENU');
V_IGNORE := POPULATE_GROUP('RG_DATA_TEST');
FTREE.POPULATE_TREE(htree);
END;
When i run the forms, It don't give me a structure of node.
It give me only a icon with two arrows.
Where is the problem ?
Must I add code somewhere ?
Help me for your ideas.
Regards.
Edited by: 794982 on 17 sept. 2010 04:55
Edited by: 794982 on 17 sept. 2010 05:01
Edited by: 794982 on 17 sept. 2010 05:04
Edited by: 794982 on 17 sept. 2010 05:06
Edited by: 794982 on 17 sept. 2010 05:13
Edited by: 794982 on 17 sept. 2010 05:19
Edited by: 794982 on 17 sept. 2010 05:23Ok Francois Thanks for your response.
Just I pricise i work with oracle forms version 9.0.4.0.19 .
But I am putting this code in trigger When_New_form_Instance but it didn't work.
When I execute it just shows a line with two arrows but not a real tree.
Then I do a block-non based and a elemnt with type hierarticall tree and a canevas.
and i create a record_group. and in a palette property of the element i precise the canevas and the record_group
I don't khnow where is the problem ?
Any other suggestion ? please
Regards. -
Add checkbox on the nodes of Hierarchical tree in oracle forms 9i
Hi,
I am working on oracle forms 9i.I have to add checkbox at the place of node(+/-) in Hierarchical tree so,
that user can select or deselect the Tree.That can do in oracle forms but how i don't know.
can anybody help me.....
Regards,
HemantYou can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
Craig... -
Tooltip not visible on hierarchical tree in Oracle Forms 11g
*Hi.. i have tried to set the "TOOLTIP" option for an hierarchical item during design time(property palatte) and also at run time( set_item_property).
But still its not working!!!
However it works for Oracle 10g forms.
Is this some kind of restriction only in Oracle 11g forms for the hierarchical items? Please help!You can't change this aspect of the Tree Control in Oracle Forms using built-in functionality. You might be able to extend the Tree Control using Java, but you have to do this yourself. : (
Craig... -
1.4.2_13 Oracle Forms - Problem after change of JAR, JRE does not respond
Hi,
We use JRE version 1.4.2_13 as this was the certified version for Oracle Forms 10g.
We recently implemented a new module that uses a Java Bean. We use Java Beans already but this one allows the user to save from an Oracle Form to there PC. Because of this we had to re-sign the JAR we use. When the user tries to go back in the system it freezes and does not allow the user to Allow permission again.
We then have to proceed to either uninstall the JRE and reinstall it (This then allows us to grant permission)
OR
We need to clear cache, remove all original certificates
Then this allows us to allow (grant always) access.
I am after a slicker way to put this new bean in place without asking everyone of our users to mess around doing the above.
Is there anyway to invoke an auto uninstall or an auto clear cache, clear certificates
Is there a way to stop it freezing up when first entering?
Thanks in advance..anyone?
-
Oracle forms problem-can't be run in mozilla 3.6.12 windows vista business
Dear all,
I have oracle developer 10g and oracle 10g database in my machine.
I installed the developer suite 10g in my machine successfully.[vista-business edition]
I saw Steve Cosner's thread.I installed as per the thread.
Forms 10g installed and running on Windows VistaBut I cant succeed to run the forms in mozilla. it shows error "connection was reset". what can I do?
Please help me.
Regards,
SBBe aware that if you are running on Vista, your Forms version must be 10.1.2.3 (meaning 10.1.2.0.2 patched to 10.1.2.3)
If the browser is crashing it generally means one of the following is occurring:
1. There is a JRE version conflict. This most often occurs when a plugin uses a different java version than the JRE you are trying to launch. Try disabling all the browser plugins except the JRE
2. The JRE installation is corrupt. Uninstall ALL JRE versions which have been installed. Reboot the machine. Then, with ALL browsers closed, installed just the version you want to use.
3. Windows DEP or UAC settings are preventing the JRE from starting correctly. Relax the UAC settings and ensure that DEP is not blocking the javaw.exe or java.exe processes. Changes to either of these settings will require reboot.
UAC
(Win-Vista) http://windows.microsoft.com/en-US/windows-vista/Turn-User-Account-Control-on-or-off
(Win7) http://support.microsoft.com/kb/975787
DEP
http://windows.microsoft.com/en-US/windows-vista/Change-Data-Execution-Prevention-settings -
When i try running my form it gives me the following error:
FRM-10142: THE HTTP listener is not running on admin-vast5oc0q at port 8888. Please start the listener or check ure runtime preferences.
I managed to fix this error by starting the OC4J instance but then i get an invalid syntax error and it says page cannot be displayed. PLEASE HELPI suggest you try the appropriate forum: Forums Home » Oracle Technology Network (OTN) » Products » Developer Suite » Forms
Regards, APC -
How to create a hierarchy Tree
Oracle Forms 6i
Hai All
Could Any Tell me the steps to create a hierarchy tree in oracle forms
My table is employee_master and fields are
Empcode number ,
Empname varchar,
deptcode number,
gradecode number and etc
Here i need to create a tree with Deptcode in that every employees are seperated by grade code
Thanks In Advance
Srikkanth.MDear,
If you get any problem while creating tree, will help you step by step.....
Thank you, -
Webutil Problem in Oracle Forms 10g
Hi All,
been reading various posts over time on the forums but this is the first time for me to post here.
My name is george an i am a novice forms developer.(very novice i would say )
i am in the process of altering an existing form, and i am trying to add webutil functionality to the form.
i am succesfull getting webutil to run but i get some weired behaviour from the form, and in more detail i get the 40200 error.
the error only appears after the usage of webutil in the form and this prevents the user from entering a query string in a text item (actually it is when the user tries to type in the text box that oracle throws the 40200).
i am able to get around this problem, by moving the WEBUTIL DATA BLOCK at the end of the DATA BLOCKS tree. The form once more works as it should (queries etc) only that the webutil window and canvas are displayed on the top of my form (i.e webutil about form) and the user has to click OK to get rid of it.
i have tried to hide the webutil window, the webutil canvas but i am unsuccesful.
any ideas of how to keep the webutil data block at the end of the data block tree but not appearing in front of the form ??
i hope i did not confuse you with my explanation.
thank you,
GeorgeOracle Forms is Heirarchical. It uses the order in which items appear in the Object Navigator as the "Default" navigation order. Items like WebUtil should always appear after other objects (such as Data Blocks, Canvases and Windows). Making sure objects are listed in the right order in the Object Navigator is typically all you need to do, however, you could use the Form Module First Navigation Data Block property to override the default heirarchy (as MLBrown suggests) as well as write code in a When-New-Form-Instance trigger to Hide the WebUtil canvases and direct the form to the desired starting point (first navigation block/item).
I personally, prefer to use the order of objects in the Object Navigator since this does not require any lines of code or the setting of properties.
On a side note, it is always good to post your Forms version (eg: 10.1.2.0.2 versus 10g) when posting a Forms question. :)
Craig... -
Hello experts,
I am new in oracle forms and i am using oracle forms 11g with weblogic server 10.3.5 at windows7.I have a problem to make a tree item in oracle forms based on two tables.
I have 2 tables as:
TBL_ARTICAL_MSTR
ARTICLE_ID
ATRTICLE_TYPE
1
MAN
2
Women
TBL_ARTICLE_DTL
ARTICLE_NO
NAME
ARTICLE_ID
1
Jeans
1
2
Skirts
2
3
T-Shirt
1
Now I want a tree view as:
|
|___MAN
| |______JEANS
| |______T-Shirt
|
|___WOMEN
|______Skirts
For this I have made a Record group with a sql query as:
SELECT 1 , level , TBL_ARTICAL_MSTR.ATRTICLE_TYPE,TBL_ARTICLE_DTL.NAME , NULL , to_char( TBL_ARTICLE_DTL.ARTICLE_NO)
FROM TBL_ARTICAL_MSTR LEFT JOIN TBL_ARTICLE_DTL ON TBL_ARTICAL_MSTR.ARTICLE_ID=TBL_ARTICLE_DTL.ARTICLE_ID
CONNECT BY prior TBL_ARTICLE_DTL.ARTICLE_NO = TBL_ARTICAL_MSTR.ARTICLE_ID
START WITH TBL_ARTICAL_MSTR.ARTICLE_ID=1
But There is no any output,Please help me to know that how can i solve it.
Thank You
regards
aaditya.how to create hierarchical tree form
https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-how-to-create-a-hierachical-tree-form -
List Item problem in oracle forms
Hi,
I am using list item in oracle forms 6i and facing one problem. I am populating list using following built-in.
Clear_list()
Create_Group_From_Query( )
Populate_list()
The problem I am facing is when list gets populate it keep the cursor at last element of list with null value. I want cursor to go at first item in the list. Is this thing is possible. The list item I am using is pop-list. In combo its showing list perfectly but I have to use pop-list only. Please help to come out of this problem.
Thanks in advance
Shweta.Hi Shweta,
Please post your query in Oracle Forms discussion forum.
Thanks,
Wilson. -
Oracle Forms Designer has encountered a problem and needs to close
Dear All,
I got the following error when I compile the form,
Oracle Forms Designer has encountered a problem and needs to close
I am using Oracle 10g Developer suite(Forms 32 Bit Version 10.1.2.0.2)
and Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
and Window Xp Professional 32 Bit Operating system
Now I can't do any changes in the form.
I searched lot of oracle forums .but i can't solve it.
Please give me one solution
I am strugling this issue.
Please help me........
a lot of thanks in advance.
Thanks and Regards,
FazilHi,
I am doing the bug fixing in the existing form.Its size is 4.07 MB.when i will get the mentioned error.then i will take previos fmb.then again doing the changes after some time agin will come the mention error.I added some if else condtion code.Its a small code.I think its not a reason for the mentioned error.I think something is happended.I don't know what happened?
Please help me..
Thanks and Regards,
Fazil -
Problem with inserting new records in Oracle Forms
Hi Friends,
I am a new user to Oracle Forms and I need a help from you people. The problem is as follows:
I have a data block in which I can display a number of records. In this data block the user will be able to edit the fields if no child records are found in another table. I have used when-new-record-instance to attain this scenario. All are text items. One item licensee_id which is made invisible by setting the property in property palette and required=no ( as this is the primary key of the table). Also the audit columns are made invisible.
The code for it is as follows:
DECLARE
v_alert_button NUMBER;
v_cnt NUMBER;
BEGIN
SELECT COUNT (*)
INTO v_cnt
FROM id_rev_contracts
WHERE licensee_id = :ID_REV_LICENSEES.licensee_id;
IF v_cnt > 0 THEN
set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_FALSE);
ELSE
set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', UPDATE_ALLOWED, PROPERTY_TRUE);
-- set_item_property('ID_REV_LICENSEES.LICENSEE_NAME', INSERT_ALLOWED, PROPERTY_TRUE);
END IF;
END;
Now in this data block I should also be able to insert new records and for the same I have used PRE-INSERT trigger and the code for it is as follows:
DECLARE
v_alert_button NUMBER;
CURSOR v_licensee_id IS SELECT id_rev_licensees_s.NEXTVAL FROM dual;
BEGIN
OPEN v_licensee_id;
FETCH v_licensee_id INTO :id_rev_licensees.licensee_id;
CLOSE v_licensee_id;
IF :id_rev_licensees.licensee_id IS NULL THEN
Message('Error Generating Next v_licensee_id');
RAISE Form_Trigger_Failure;
END IF;
:ID_REV_LICENSEES.created_by := :GLOBAL.g_login_name;
:ID_REV_LICENSEES.last_updated_by := :GLOBAL.g_login_name;
:ID_REV_LICENSEES.create_date := SYSDATE;
:ID_REV_LICENSEES.last_update_date := SYSDATE;
EXCEPTION
WHEN form_trigger_failure
THEN
RAISE form_trigger_failure;
WHEN OTHERS
THEN
v_alert_button :=
msgbox ('ERROR in Pre-Insert - ' || SQLERRM, 'STOP', 'Contact IST');
RAISE form_trigger_failure;
END;
Every thing is compiling fine but at the run time when I am trying to insert a new record I am receiving the following error:
FRM-40508:ORACLE error:unable to insert record
I also think the pre-insert record is not firing at the time of inserting a new record and saving it. So I request you to please delve into this problem and suggest me how to overcome this problem. Code snippets would do more help for me. If you need any other things from me please let me know. I will see if I could be of any help in that concern because I may not be able to send the entire form as it is.
Thanks and regards,
Vamsi K Gummadi.first of all
pre-insert fires after the implicit/explicit commit/commit_form is issued and before the real insert is submitted to the db.
i would suggest to remove the error handling part for the moment
because i believe you might be getting "ora-xxxx cannot insert null"
and also make visible the primary column to check if the pre-insert is executed.
it would be better to make visible for a while the not null columns of the table/block
i suppose that the block is insert allowed and you are using table as the source of the block and not any procedures or something... -
Problem inputting Chinese characters in oracle forms
Hi,
We have a Chinese character: UCS2=7A4F (UTF8=E7A98F) If we try to input it to a control in a Forms application using chanjie (key sequence h-d-b-s-p) input method, it becomes "?", but if we input it using same method in word or notepad, it shows correctly and can then be copy-and-paste to oracle forms.
Is there some sort of implicit conversion of Chinese character input done by Oracle Forms controls such that it is unable to decode this character properly? Or is there some sort of setup that can be done to bypass this problem?
Any help would be greatly appreciated, hopefully as soon as possible.
Thank you very much.979801 wrote:
If I use LOV in place of List Item,Then I have to populate a LOV at run time.How could I maintain a record group n attach to LOV at run time?
On my previous post I have mentioned record group as follows:
select * from tbl_state where s_id=:tbl_address.s_id;
If :tbl_adress.s_id chaned during the time of run, then output values of list_city (LOV) is also changed. -
Problem installing Oracle forms and report in windows 7
I have a problem while installing Oracle forms and reports in windows 7 64 bit
The error is : [as] [ERROR] [] [oracle.as.provisioning] [tid: 20] [ecid: 0000IY5_e_EApIRMyYAhMG1BuDGr00000B,0] [[
oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:688)
at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:393)
at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
at java.lang.Thread.run(Thread.java:619)
So I Google for it and found that this is version mismatch (May be I am wrong) and it tells that I have to install WLS - 10.3.2 with ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
But I am unable to get wls version 10.3.2.
For better understanding I am listing my installers :
(I) Windows 7 Ultimate 64 Bit
(II) (Oracle 11g) win64_11gR2_database (1 & 2)
(III) ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
(IV)wls1033_generic.jar , wls1033p_generic.jar , wls1035_generic.jar
(V)accessbridge-2_0_2-fcs-bin-b06
(VI)ofm_rcu_win32_11.1.1.2.1_disk1_1of1,ofm_rcu_win_11.1.1.3.1_disk1_1of1
(VII) ofm_wc_generic_11.1.1.5.0_disk1_1of1
(VIII)jdk-6u38-nb-7_2_1-windows-i586-ml , jdk-6u38-windows-x64
(IX) oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-win32
(X)wls1033_oepe111150_win32.exe
(XI)wls1035_win32.exe
(XII)wls1035_oepe111172_win64
(XIII)oepe-indigo-installer-12.1.1.0.1.201203120349-12.1.1-win64
After the installation while configure the forms reports, I am stuck while creating domain.
steps I follow is :
(i) Install Windows 7 Ultimate 64 Bit
(ii) (Oracle 11g) win64_11gR2_database (1 & 2)
(iii) wls1033_generic.jar
(iv) accessbridge-2_0_2-fcs-bin-b06
(v)ofm_rcu_win32_11.1.1.2.1_disk1_1of1
(vi) ofm_pfrd_win_11.1.1.2.0_64 (1 to 4)
Please any body help, for the installation of oracle forms and reports.
I have a formatted Windows 7 Ultimate
Where I have installed Adobe Acrobat Reader
IIS server from windows installer
Now I want to know the exact procedure so that i can run the forms and report in my machine.
This is my first installation of Oracle forms & Reports, so please do not pre assume about my understanding (Like "to install this he surely did this environment settings" )
Please specify all the steps
Furthermore if Another software I have to download then please tell me.
And I will be grateful if you specify the mistakes in my side.
Looking forward with anticipation.Solved, Thank you
Maybe you are looking for
-
In table PAYR field CHECV is not being populated when void check is reissue
Hello, we are trying to find a link between original check # that is voided and then new check # is issued when the reopened invoice is repaid. It is very cumbersome trying to research back to original check # as there is not link in any SAP tables
-
MY BROWSERS DOESNT WORK.
my mac is a mac that i had since 2009. So i opened up google chrome as always, and clicked on youtube on my tab and a page appeared that said, ERR_EMPTY_RESPONSE and whenever i open any sites except for facebook, soundcloud and google, the page that
-
Often when working intensely on a large project which spans over days I forget to mark the start and finish time for each session. When billing clients for time this can create problems. I thought the perfect solution to this problem would be to so
-
Trying to restore from migration assistant to 2nd drive...
I recently got a Mac Mini server with 2 500gb HDs. Coming from my old mac pro I was able to successfully migrate everything except my itunes library to the system HD (not enough space). My itunes was too big to fit on the 500gb drive so I'd like to m
-
WEP key too long to input in Nokia C3
Has anybody run into this problem? I was able to enter the key in E71, N8, but not C3 as it was apparently too long. It would not accept any more charaters in the input field.