Problem Multiple record navigation in oracle forms
I retrieve multiple records using cursor fetch command in the select query i have given condition to retrieve details of employee no.
For example if we are giving an input as empno:100 then it retrieves two records of same emp no(100).It displays 2/3 records in the task bar when i navigate using push buttons it displays an empty record in the interface provided.(ie 3/3 records).How to avoid third unknown record displaying in the interface.
most likely the problem is during the population of the block using the query.
i assume that you are creating one additional record after the last record from your query..
so this must be either with the CREATE_RECORD or NEXT_RECORD problem in the loop.so you should check in the loop first if the record exists, then do CREATE_RECORD or NEXT_RECORD.
Similar Messages
-
How to enable Multi-record select in Oracle Forms
Hi
we recently upgraded to R12 -- 12.1.3.
we have a requirement in which I should let the users select multiple records in a tabular Form (custom form).
Currently we have a custom form that displays Open sales orders with credit holds. After selecting the record, the user can release the hold on the order by clicking on a button. The requirement is for enabling selection of multiple records and release.
We have a similary functionality in 'Quick Sales Orders' form. In this form, multiple lines can be selected by pressing 'CTL' and clicking on the records.
I read about using APP_MULTI for this. But I couldnt figure out how to enable the multiple selection.
If someone could throw some light on this, it would be greatly helpfulSee http://stackoverflow.com/questions/3291758/how-do-i-use-the-app-multi-package-to-support-multi-selection-in-my-oracle-form for steps/sample code.
Sandeep Gandhi -
Get three previous records of the current record in an Oracle Form
Hi,
I need to get three previous records of the current record in an Oracle Form
Sorry for the lengthy explanation:
I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
COLL_TIME
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
10 rows selected.
SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
TO_CHAR(COLL_TIME)
12-aug-2005:02:42:00
12-aug-2005:02:43:00
12-aug-2005:02:44:00
12-aug-2005:02:45:00
12-aug-2005:02:46:00
12-aug-2005:02:47:00
12-aug-2005:02:48:00
12-aug-2005:02:49:00
12-aug-2005:02:50:00
12-aug-2005:02:51:00
10 rows selected.
This is the Requirement:
In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
(i.e. 12-aug-2005:02:46:00)
When the fifth record is the current_record and When I click a button, three previous records of the
current_record should be populated on the screen.
See what I did:
I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
which are less than the current record and ORDER BY DESC.
CANVAS:
Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
second block (BLK2) is empty.
So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
three previous records of the current record( :BLK1.COLL_TIME)
(off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
This is the code I wrote in the trigger and followed by the error:
1 BEGIN
2 DECLARE
3 cursor c1 IS
4 SELECT MONITOR_ID,
5 SAMPLE_ID,
6 COLL_TIME,
7 DEW_POINT
8 FROM ARCHIVE_DATA;
9 cursor c2(passing_date IN date) IS
10 SELECT MONITOR_ID,
11 SAMPLE_ID,
12 COLL_TIME,
13 DEW_POINT
14 FROM (SELECT MONITOR_ID,
15 SAMPLE_ID,
16 COLL_TIME,
17 DEW_POINT
18 FROM ARCHIVE_DATA
19 ORDER BY COLL_TIME desc)
20 WHERE COLL_TIME < passing_date;
21 BEGIN
22 FOR cur_rec in c1
23 LOOP
24 IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
25 FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
26 LOOP
27 IF c2%rowcount < 4 then
28 BEGIN
29 INSERT INTO THREE_RECS
30 values(second_cur_rec.MONITOR_ID,
31 second_cur_rec.SAMPLE_ID,
32 second_cur_rec.COLL_TIME,
33 second_cur_rec.DEW_POINT);
34 COMMIT;
35 END IF;
36 END LOOP;
37 END IF;
38 END LOOP;
39 END;
40 END;
This is the error I am getting:
Error 103 at line 14
Encountered the symbol "(" when expecting one of the following
a PL/SQL variable or double quoted string
an expanded name
an expanded name link
a table reference __expression
a key word
Resuming parse at line 126, column 46
Thanks in advanceChange C2 to:
cursor c2(passing_date IN date) IS
SELECT MONITOR_ID, SAMPLE_ID,
COLL_TIME, DEW_POINT
FROM ARCHIVE_DATA
WHERE COLL_TIME < passing_date
ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time -
Configuration of Netscape Navigator for Oracle Forms on Netscape 8.12 Ver.
Dear Forum,
I have the experience of confiugring the Internet Explorer for Oracle Forms Web-deployment. But I just want to know what are all the changes are required to configure the Netscape Navigator for Oracle Forms Web Deployment. I came to know that it needs some changes in .dlls. Please advice me any techincal refereneces in this regard.Aashil,
I've a similar configuration: Sun Sparc Solaris 8, Forms 6i Patch 10 and Apache server which comes with Oracle 9i server.
Forms 6i is on his own Oracle home. I have Forms Listener Servlet working.
Take a look in ../Apache/Jserv/etc/jserv.conf Make sure ApJServMount /servlets /root and ApJServMount /servlet /root
are defined. If you want I could mail you my conf-files. My email-address is [email protected]
kind regards,
Ivan
Configuration of Listener Servlet with patch 8 on Sun SPARC Solaris
I am trying to install and configure Forms6i Application Server for Sun SPARC Solaris 8 with Patch8.
I am installing application server in /home/oracle/home9iAS, and have set up the development environment in /home/oracle/forms6i.
1) First i install Forms Server and Reports Server, for that i need to define following env variables
$ORACLE_HOME is /home/oracle/forms6i
$ORACLE_BASE is /home/oracle
i am defining them in .profile file in oracle account.
2) Apply Patch 8
3) Install Application Server with Minimal Installation
4) Configure Forms Listener Servlet using http://otn.oracle.com/products/forms/pdf/p8listenerservlet.pdf pdf file, i am following it to the letter.
When i try to access forms listener server using http://hostname:port/servlet/oracle.forms.servlet.ListenerServlet i get an error:
"Not Found
the requested URL /servlet/oracle.form.servlet.ListenerServlet was not found on this server."
What can be the reason? -
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 with List Item in oracle forms
Hello Experts,
I am new in oracle forms and i am using oracle forms 11g with weblogic 10.3.5 at windows 7.
I have 3 database tables say(tbl_city,tbl_state,tbl_address).
tbl_city
C_ID
C_name
S_ID
0
None
0
1
XYZ
1
2
AS
2
3
AXD
2
tbl_state
ID
s_ID
S_Name
0
None
1
XY
2
ASD
tbl_address
A_ID
A_Street
S_ID
C_ID
1
ABC
1
1
Now I have made an oracle form having data block tbl_address with base table name tbl_address. In the form there are two list: one(list_state) for State_Name & State_ID and another(list_city) for City Name & C_ID display.
Here I want when I set State_name to ASD then List item list_city should be populated with the values having State_NAME=ASD not of State_Name=XY or None.I have tried it to make but not succeeded.I have made a procedure to populate list_city list item as:
-- here item_nm-->List item Name, sel_val & sel_val2 for selecting C_ID and C_NAME, tablNm---->tbl_CITY, whr for where condition, mtch--->selected value of list_State(list item in form)
PROCEDURE list_item(block_nm varchar2,item_nm varchar2,sel_val varchar2,sel_val2 varchar2,tablNm varchar2,whr varchar2,mtch varchar2) IS
group_id RecordGroup;
group_name varchar2(10) :='abc';
status NUMBER;
query1 varchar2(350);
item_name varchar2(20);
match varchar2(50);
BEGIN
match:=mtch;
item_name:=block_nm||'.'||item_nm;
group_id := find_group(group_name);
if not id_null(group_id) then
delete_group(group_id);
end if;
--if whr='' then
-- match:='0';
-- end if;
query1:='select '|| sel_val || ',TO_CHAR('|| sel_val2 || ') from '|| tablNm ||' where '||whr||' = '||mtch;
message(query1);
group_id := Create_Group_From_Query(group_name,query1);
/* Select statement must have two column*/
status := Populate_Group(group_id);
Populate_List(item_name,group_id);
exception
when others then
message('error');
END;
I am not able to guess what trigger in oracle forms should be used to populate list item(list_city). Please help by giving useful suggestion.
Thank You
regards
aaditya979801 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. -
Need some more fields displayed in record history of oracle forms
Hi ,
I am using oracle forms 6.0.8.8.0 . My requirement is to display PROGRAM_ID , PROGRAM_APPLICATION_ID , PROGRAM_UPDATE_DATE , REQUEST_ID in the record history of the forms along with CREATION DATE , CREATED BY , LAST UPDATE DATE , LAST UPDATE LOGIN , TABLE which are already being displayed .
Please help .Actually when the record history is to be brought , we need to make it database fields or write code to post query . So I think I can get a solution in this forum as we need to make changes in form only in order to show in record history .
-
Updating status of multiple records after saving the form
Hi all
I have a tabular form
It has a column status (new,good ,very good ,excellent are the list options)
The user goes and modifies a number of records on the detail block and saves the records
what i want to do is that when the user clicks the save button after updating any number of records
the status field should be updated with the value (new)
the status field of those records should be updated with the new value which the user has modified not all the records
Please let me know how to go about it
thanks
Edited by: bindok mulga on May 11, 2009 3:48 PM
Edited by: bindok mulga on May 11, 2009 3:50 PMHi
actually my earlier post was incorrect
i have edited my post
Actually
i want to update only those records that the user has modified
eg
col1 col2 status
1 ABC good
2 PQR good
3 xyz good
4 lmn excellent
5 abcz excellent
is the table before the user modifies
the user goes and modifies multiple records as following
col1 col2 status
1 aaa good
2 PQR good
3 xxx good
4 sss excellent
5 abcz excellent
and the user saves the form
now i want the following output
col1 col2 status
1 aaa new
2 PQR good
3 xxx new
4 sss new
5 abcz excellent
only the modified record's status should be updated
sorry for the earlier lapse -
How to write WHERE clause in dynamic record group in oracle forms
hi this is s.v.eswar,PLZ HELP ME
i am new to oracle forms
i want to write where clause in dynamic recordgroup
this is the code i have written
DECLARE
MGR_ITEM ITEM:=FIND_ITEM('MGR');
RG_ID_MGR RECORDGROUP:=NULL;
MGR_DUMMY NUMBER;
BEGIN
RG_ID_MGR:=FIND_GROUP('MGRNUMBER');
IF ID_NULL(RG_ID_MGR) THEN
RG_ID_MGR:=CREATE_GROUP_FROM_QUERY('MGRNUMBER','SELECT DISTINCT TO_CHAR(EMPNO),TO_CHAR(EMPNO) FROM EMP WHERE JOB='MANAGER''); --THIS IS THE LINE I AM GETTING ERROR
END IF;
IF NOT ID_NULL(RG_ID_MGR) THEN
MGR_DUMMY:=POPULATE_GROUP('MGRNUMBER');
IF MGR_DUMMY=0 THEN
POPULATE_LIST(MGR_ITEM,'MGRNUMBER');
END IF;
END IF;
END;
COMPILE TIME ERROR
1)I have written where clause like this WHERE JOB='MANAGER'
then oracle compiler has given error like
ENCOUNTERED THE SYMBOL 'MANAGER' WHEN EXPECTING ONE OF THE FOLLOWING .,().........etc
(FOR THE ABOVE ERROR I JUST REMOVED SINGLE CODES AND WRITE LIKE THIS ----->WHERE JOB=MANAHER)------>THEN COMPILED SUCESSFULLY)
AND I RUN THE FORM
RUN TIME ERROR
FRM-41072: CAN NOT CREATE GROUP 'MGRNUMBER'Hi there
pls have a look here
Dependent drop down lists in forms 6i
hope this helps...
regards,
Amatu Allah -
Validations/checks on Navigations in Oracle Forms 4.5
Hi,
I am writing some validation on[b] Key-Next-Item trigger of item in Form displaying records in tabular fashion.
Now if any error occurs ( either oracle or user defined) I want to stop further processing and focus should be on that item only.
This is working fine ( Key-next-item) when i press tab-key But when I navigate using mouse to next item, though triggers fires ( I tried When-Validate-Item also) but focus is going to next item which I press/navigated using mouse. How should I check this validation? which kind of trigger i should use?
Regards,
Milind JadhavMilind wrote:
I had tried with WHEN-VALIDATE-ITEM also but even after raising RAISE
Form_Trigger_Failure, I am not able to stop the cursor from moving it to next itemTry again. Do NOT put the code in key-next-item OR post-text-item. When-validate-item trigger is the only correct place to put field validation code.
A typical when-validate-item trigger looks like this:
-- When-validate-item trigger on :BLOCK1.COLUMN2
If :BLOCK1.COLUMN2 not in ('A','B','C') then
Message(' Error: Value must be A, B or C');
Raise Form_Trigger_Failure;
End if;If what you try does not work, post the code. -
Problem in importing JavaClass in oracle forms
Hi gurus,
I
I am using
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Oracle Toolkit Version 10.1.2.0.2 (Production)
PL/SQL Version 10.1.0.4.2 (Production)I am trying to import java Class into forms builder. I am doing this for the first time .
for this I have done...........
I made a simple class in jDeveloper for practice with simple output line
public class getSystem {
public String var ="thistext";
* @param args the command line arguments
public String get_text() {
return this.var;
public static void main(String[] args) {
System.out.println("this is test");
}then I made this file as SAM.JAR (using deploying methode)
set directory path of this SAM.JAR forms_builder_path in regedit,
then import this class in form builder using program > import java class
have the following code in program units
PACKAGE getSystem /* getSystem */ IS
-- DO NOT EDIT THIS FILE - it is machine generated!
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY);
-- Method: get_text ()Ljava/lang/String;
FUNCTION get_text(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2;
END;-----------------------------------------------------------------------
PACKAGE BODY getSystem IS
-- DO NOT EDIT THIS FILE - it is machine generated!
args JNI.ARGLIST;
-- Constructor for signature ()V
FUNCTION new RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := NULL;
RETURN (JNI.NEW_OBJECT('getSystem', '()V', args));
END;
-- Method: main ([Ljava/lang/String;)V
PROCEDURE main(
a0 ORA_JAVA.JARRAY) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
JNI.CALL_VOID_METHOD(TRUE, NULL, 'getSystem', 'main', '([Ljava/lang/String;)V', args);
END;
-- Method: get_text ()Ljava/lang/String;
FUNCTION get_text(
obj ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
BEGIN
args := NULL;
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'getSystem', 'get_text', '()Ljava/lang/String;', args);
END;
BEGIN
NULL;
END;----------------------------------------
I made a simple form having one button , on when-button-pressed trigger I wrote this code
declare
Jvar ORA_JAVA.JOBJECT;
Fvar varchar2(100);
ex varchar2(5000);
javaException ORA_JAVA.JOBJECT;
begin
Jvar := getsystem.new();
Fvar := getsystem.get_text(Jvar);
message('this is outcomes from java'||Fvar);
EXCEPTION
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
message('Java Exception');
WHEN others THEN
message(sqlerrm);
END;---------------------------
it shows me message 'java Exeption' which means something is wrong ....
when I used this code taken from form builder's help
EXCEPTION
WHEN ORA_JAVA.EXCEPTION_THROWN THEN
javaException := ORA_JAVA.LAST_EXCEPTION;
-- Print out the Exception by using the toString()
-- Method of the exception Object
message(Exception_.toString(javaException));
-- and clean up
ORto catch the exception it shows toString must be declared.....
once I know how to get the value of java methods on forms I could countinue my practices using java on forms please guide me
thanksthanks for you kind replies Sir,
Craig Sir now it's working very well for me , now I can get and set the values of variables and as well as methodes
the problem was solved ,
Andreas Weiden Sir your was right I didn't set the classPath setting in .ENV file , thanks a lot ..
these are the points I really wanna share for those who'll ever face the same problem..
(1) made simple class in Jdeveloper
public class getSystem {
public String varibless ="thistext";
* @param args the command line arguments
public int get_text(int bc) {
int a = 5;
int b= 10;
return bc+a;
public static void main(String[] args) {
getSystem var2 = new getSystem();
System.out.println(var2.get_text(5));
}make it .jar file using deploying mathode...
(2) set FORMS_BUILDER_CLASSPATH in regedit..
(3) restart forms builder and go to progarm > import java class
(4) select the class name that you made
(5) press option button and check include get/set public fields if you wanna interact with variables in class
(7) now make simple canvas with button , us this code on when-new-button press trigger
declare
Jvar ORA_JAVA.JOBJECT;
Fvar varchar2(100);
ex varchar2(5000);
javaException ORA_JAVA.JOBJECT;
--mn ORA_JAVA.JARRAY(10);
begin
jvar := getsystem.new;
Fvar := getsystem.get_text(Jvar,5);
message('this is outcomes from java'||Fvar);
ex := getsystem.getvaribless(jvar);
message('value of the variable in class '||ex);
--- similerty change the value of variable in class and then get it again
getSystem.setvaribless(jvar,'yournewvalue');
EXCEPTION
WHEN ORA_JAVA.java_error THEN
message( ora_java.last_error);
WHEN others THEN
message(sqlerrm);
END;hope for the best.....
thanks a lot again...
regards:
usman noshahi -
Problem in Unicode Data in Oracle Forms 6i
hello all,
i m using forms 6i with oracle 10g.
i have set Nls_lang =American_America.UTF8.
Now my problem is when i type some data i marathi Using a font
converter engine directly into the text box on form i just get
?????? in the text box.
But when i type same data on notepad n then paste it in textbox it gets
properly pasted and also get inserted in oracle .I m also able to
retrive it back properly.So i think it is not the problem of my
character set.Also i have set the font of textbox as Arial Unicode Ms.
i m not getting where the problem is?
I will b very thankfull if i get any help regarding this.Try checking the Job status in Report Servlet for the Errror.
-
Import Multiple Records to a PDF Form
Hi,
I produce a separate XML file for every voucher sent to a client on a golf tour. Using a form created in LiveCycle Designer 8.0 I create a corresponding PDF document for each voucher and import the data using Acrobat XI Pro.
However I need a better solution and came across this
Record-based processing using LiveCycle Output ES | Adobe Developer Connection
but the 'output' requires Live Cycle ES.
I followed the instructions in the above article and modified the form so that the bindings are in place from the XML fields to the form fields,
Essentially I want to create one XML files for all vouchers and then do one import (i.e. a single PDF document with multiple pages) where Acrobat Pro XI identifies each XML 'voucher' node and appends another copy of the form as a new PDF page. If it makes any difference there is only one form and it is designed to be A4 size.
Is this possible?
Many thanks,
PeterLiveCycle forms are very different from Acrobat forms. You might get a better response in the LiveCycle forums.
-
How to disable 'Clear Record' option in Oracle Forms deployed in Orcl Apps
Dear Members,
I have developed a custom form which is deployed in Oracle Applications.
In this form I want to disable the 'Clear Record' option to prevent users from clearing the record.
Can any one please tell me how can I do it?
Thanks in advance.
Best Regards,
Arun Reddy D.Hi,
In your Forms---> trigger--> KEY-CLRREC-----> NULL;
You cant clear any record. -
Problems reading XLS numeric Cells Oracle Forms HELP
I have a problem using WEBUTIL reading a numeric cell in excell sheet, the value not show in the form.
This is a piece of the code im using for this.
column:= 5;
Set_Custom_property ('XLSUTIL.READ',1, 'CELL', sheet||','||Lrows ||','|| column);
:bl.year := Get_Custom_property ('XLSUTIL.READ',1,'READ');
please help me with this.ok, i understand... i will check, but you have a way to import excel sheet cell numeric field to oracle? any clue? im lost with this. I just have the problem with numeric cells.
Thank you for your help.
Maybe you are looking for
-
How to boost Frame Per Second?
Ok I see all these games that get a good 30-60 fps. I have a game I created that is 2d with some .png images. I need to boost my fps from 16 to 30+ How would I go about this? This is how I have it set <Main Applet> -> <swing.timer(1ms)> -> Repaint()
-
Error 51 when upgrading iphone 6 to ios 8.1.3.
looks like the serial number is lost when preparing the phone for the update. can't be verified by apple servers. tried to restore. nothing; still not recognized. tried dfu, same result. basically, i have a large, expensive brick
-
Dear sir, Suppose the table(AA) contain field(aa) of varchar2(2). If we insert into AA values('123') then the sql plus will show message like ORA-12899: value too large for column "SDE"."AA"."AA" (actual: 3, maximum: 2) SQLERRM function returns the e
-
We are using "line weights view" to view drawings at a high zoom level. We would like to print the current view including the "line weights view". Is there a possibility to print the "line weights view"?
-
Macbook Pro, Windows xp, Airpot Extreme, and Internet...
This may have been touched on in this forum but I still cannot make things work (semi-newbie). MBP 2.33 15", the vendor installed Windows XP, and there is not a problem connecting from the Mac side to my Airport extreme wirelessly. The Windows side,