Forms :: How To Display Runtime Calculation In Cursor
May 18, 2010
How To Display Runtime Calculation in cursor for example in loop i define xyx number then add + 1 in xyz and move its value to block item until loop valid but in display no value shown but if i apply message(xyz) then it also shown the answer is correct but with message style i click every time in message but i want that with some delay form automatically show the value of xyz in block field.
is there a way to keep the display of the form when we call another new form. my scenario will be as following:
am in form1 , i call form 2 from a menu, after this call form2 is open in place of form1.
i have no control in form1 and i can't change anything on it, i don't know hw the menu option is calling form2.the only control i have will be within form2 if there is any change i can make it.i read something about MDI, and OPEN_FORM() procedure, but i think this will required a change in form1 which i can't do.
is there any change i can make in form2 to display it and keep the display of form1 at the same time behind it ?
in below program,i have to pass column name to cursor at runtime..but this giving error.
DECLARE TYPE EmpCurTyp IS REF CURSOR; v_emp_cursor EmpCurTyp; emp_record hr.employees%rowtYPE; v_stmt_str VARCHAR2(200); colname varchar2(10):='Last_name'; BEGIN
[code]....
dbms_output.put_line(emp_record); * ERROR at line 13: ORA-06550: line 13, column 1: PLS-00306: wrong number or types of arguments in call to 'PUT_LINE' ORA-06550: line 13, column 1: PL/SQL: Statement ignored
create or replace procedure Country_sel(key in varchar2) as cc Res_RelcountryLan.countrycode%type; len Res_Language.langname_en%type; lid Res_Language.langid%type; ab Res_Language.Abrivation%type;
[code]....
when i am running this code im getting
ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "RASOOL.COUNTRY_SEL", line 11 ORA-06512: at line 6
Oracle Version: 11.2.0.2.0. I have two explicit cursors and I would like to choose at run time which one to run. Here is a simplified code snippet of what I am doing today:
DECLARE CURSOR Cursor_A IS SELECT * FROM EMP_A; CURSOR Cursor_B IS SELECT * FROM EMP_B; RUNA CHAR(1) := 'Y';
[code]....
I want to avoid maintaining the same long list of transformations. I also want to avoid, if possible, an explicit FETCH INTO, because there are hundreds of fields in both tables. I'm looking for something like this (and I know this doesnt work):
DECLARE CURSOR Cursor_A IS SELECT * FROM EMP_A; CURSOR Cursor_B IS SELECT * FROM EMP_B; RUNA CHAR(1) := 'Y'; CursorToRun IS REF CURSOR;
Begin open p_result for select distinct d.dname, d.loc, e.empno, e.job from dept d, emp e where d.deptno=e.deptno; fetch p_result into v_dname,v_loc,v_empno,v_job; dbms_output.put_line(v_dname||' '||v_loc||' '||v_empno||' '||v_job); end;
This is throwing me error saying " ORA-06550: line 7, column 15: PLS-00103: Encountered the symbol "REFCURSOR" when expecting one of the following:"
I am developing a form where I need to add Numbers.In fact we have a bag of Cones that contain 24 cones.In normal calculation when I add numbers for example
5.24 Plus 5.24 it will give the result 10.48
I Need the appropriate method to calculate if I add these two numbers it should give the result 5.24 Plus 5.24 the result should be 12
Currently I am working on payroll system where I have to calculate employees working hours/late coming hours/early going hours against its roster which is defined in the beginning of every month/week.
In roster form user define shift of every employee like
Code Name Shift 7 Saad Nafees A - 09:00 17:00 492 Muhammad Nasir Shahzad B - 17:00 01:00 243 Muhammad Tahir C - 01:00 09:00
Roster table structure
code varchar2 name varchar2 Shift date Remarks varchar2
shift table structure
code varchar2 timein date timeout date latetime date Hdaytime date
Oracle stores both date and time information in date data type, suppose today user change shift timings from 17:00 to 17:30 or user change timein/timeout in attendance form then oracle will store current date with user define timings.
Now this is the main problem which I am facing because whenever you calculate difference between timein and timeout or compare with its roster then output comes wrong because oracle returns total no of hours whenever you minus two dates.
I'm getting trouble in getting the sum of all the product's prize present in the form fields of invoice form. For example, I user bought 2 products so I want to get there prize sum in the total box. I first want that I've QUANTITY, DISCOUNT and SELLING PRIZE.
If I multiply Quantity with Selling Prize then I gets the result in Product and Quantity Total Box. However, Now I want to add discount option in it. Means if user is providing 10% discount to his/her customer then Quantity * Selling Prize - Discount% becomes a result in product's solution final prize box.
Here is the pic..
Look...Now here..I've added 22 in quantity.. now if I'll insert 10% in discount then the total will comes in Amount Display Box.
I'm currently using this coding on on Prize Box.. :SP_PRODUCT_PTOTAL := NVL(:SP_PRODUCT_QUANTITY,0) * NVL(:SP_PRODUCT_PRIZE,0) * NVL(:SP_PRODUCT_DST,0) / 100;
I'm facing a problem where I create a form and I want to feed time in "HH:MI" format, Firstly I choose the "Date" datatype, but during the feeding of time i.e "00:30", means if I want to feed only mints, then it doesn't accept, at the other hand if I feed "01:30" means mints with hr then it accepts.
To get rid of this problem I changed datatype "Date" to "Varchar2".
I create 3 columns on my form "TTL_WORKING_TIME" - "TTL_RUN_TIME" = "BRK_DWN_TIME". If I get any value in "BRK_DWN_TIME" column thn it has to be distribute in 3 or 4 reason of B/D, means if I get 00:30 mints brkdwn thn 00:15 mints for "reason1" and 00:15 mints for "reason2".
How I make calculation where I use "Varchar2" datatype.
I want add a text item at run time depending on the number of values retrieved i want to change the number of text items. Is it possible at run time to add a text item?
We have a Form for viewing some datas, now i need to create a new button and Hide that button while run time for All Users except one user, how to set this option.
Addl.info: This Button should be displayed only for a single user login not for all the users using that form. how to make this option?
now what can i do for set the icon at run time..the first part of the message has been removed as it belongs to @allianz2010's previous topic; the rest has been split into a new.
I have one form that is migrated from oracle forms 6i to 11g. I opened that form by 11g form builder and it has 3 text items. Then i run the form from 11g builder...here is my problem, only 2 text items are displayed in my browser(IE). another one is invisible... i checked the property pallet for that particular text item.
i checked the following properties and its value in my form:
I develop a form using Devloper9i AS, oracle 9i, Winxp. The problem is: I used icon button at design view ".fmb" but at run time this icon disappears in the file ".fmx" After reading some topics covered this problem in this forum; The following steps are executed:
1-In regedit I put UI_ICON = c:icon --where my gif icon file is located
2-At command prompts i type: C:>jar -cvf icons.jar c:icons Then "ICONS.JAR" file is created on D:Dev9ijdkin
3- I Copy the file "ICONS.JAR" and past into D:Dev9iforms90java
Is it possible to change the item_type property of an item at runtime.
I have one text item and i need to lock(Read only) that item. I hope we can change the ENABLED property or by changing the ITEM_TYPE as DISPLAY_ITEM.
How to change the Item_Type to DISPLAY_ITEM from TEXT_ITEM at run time or else is there any other way except ENABLED property to male the field as READONLY.