Forms :: Taking Summary When Value In Field Changed?

Nov 25, 2010

I have a datablock like this

datablock name : jou_tra1_tab
No. of record dispalyed is 5

so datablock display like this

jtt_amt jtt_amt_1 ck_amt
jtt_amt jtt_amt_1 ck_amt
jtt_amt jtt_amt_1 ck_amt
jtt_amt jtt_amt_1 ck_amt
jtt_amt jtt_amt_1 ck_amt
----------------------------
ck_amt_tot

ck_amt is checkbox..
ck_amt_tot is total of jtt_amt_1 [but total only those record whose checkbox is checked]

My task is like this When i checked checkbox whatever value in jtt_amt transfer to jtt_amt_1 field

but i can change value in jtt_amt_1 field ...i want to take addition of that changed field and show that sumation in ck_amt_tot.

I write trigger when-checkbox-changed like this
-------------------------------------------------
IF :jou_tra1_tab.ck_amt = 'Y' THEN
set_item_INSTANCE_property ('jou_tra1_tab.jtt_amt_1',CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_TRUE);
:jou_tra1_tab.jtt_amt_1 := :jou_tra1_tab.jtt_amt;
else
:jou_tra1_tab.jtt_amt_1 := 0;
END IF;

and when validation item trigger for jtt_amt_1 :
--------------------------------------------------
IF :jou_tra1_tab.ck_amt = 'Y' then
:jou_tra1_tab.ck_amt_tot := :jou_tra1_tab.ck_amt_tot + :jtt_amt_1 ;
else
:jou_tra1_tab.ck_amt_tot := :jou_tra1_tab.ck_amt_tot - :jtt_amt_1 ;

But when i changed value in jtt_amt_1 field i cant get write summation .

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: Calculate A Field Taking Numeric Part?

May 11, 2011

I have a column where the values are like

SQL> SELECT distinct a.legacy_product_code FROM im_polprdmap_pukka a where a.new_product_code like '%GIFT%';
LEGACY_PRODUCT_CODE
-------------------
GIFT25
GFTPF21NP
GIFT21/H
GIFT21//

[code]...

I need to calculate a field taking the numeric part of the above filed.How can i write this?

View 2 Replies View Related

Forms :: How To Put Exceptions While Defining Summary Item

Sep 20, 2013

how to put exceptions while defining the summary item ? In one of my datablock there are certain lines whose "inactive_flag" gets a "Y" value on certain events. I want my summary item to exclude such amounts from summing up.

View 3 Replies View Related

Forms :: Update Field Based On Another Field Checkbox

May 3, 2013

I have a table where i need to update one field values based on another field of the same table , simply as it is.I have done this using one select all check box , on clicking that all check boxes of item_trans table will get selected , then i will un select some of check box and then using one button, i will update the value of the fields which are checked only.

I have put the sample code but when i am updating its taking long time and hanging.I am also attaching the form based on the test case provided.

--tables with insert statement
create table item_trans (trans_item varchar2(12),trans_qty number,trans_act_qty number)

insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE1',40,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE2',20,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE3',20,NULL);

--i want to set the value of trans_Act_qty as trans_qty

--i create one dummy or test block to keep the select all check box. for that table test script is

CREATE TABLE TEST
(
C VARCHAR2(2000 BYTE),
B NUMBER,
A NUMBER
);

insert into test (C,B,A) values ('A',1,1);

--code written in select all check box which is created on test.block.

BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
:M_END_YN := :M_END_ALL;
[code].......

--code written in M_END_YN ( actual check boxes where i will uncheck).

IF :M_END_YN = 'N' THEN
:M_END_ALL := 'N';
END IF;

--code written on button to update those values which are checked.

BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
IF :M_END_YN = 'Y' THEN
[code]......

View 5 Replies View Related

Forms :: How Column Name Of A Database Can Be Changed At Runtime

Feb 20, 2012

My form has to go into two different environment in which the one column name of a table is different. datatype is same.

I would like to change the database column name of the item in the form for that block at run time.

View 2 Replies View Related

Forms :: Error / Signature FNC_GET_DET Has Been Changed

Jun 15, 2013

I have created 1 function as below in database

FNC_GET_DETAIL(deptid number,p_pass varchar2 default 'Y', g_count out number ) return number;

I have called this function from my forms (Test.fmb) as below:

declare
g_count number;
p_deptid number;
l_ret number;
begin
l_ret := FNC_GET_DETAIL(p_deptid,'Y', g_count );
end;

now I compiled that form in RMP schema and run in the same schema it run fine.But same function i have created on another schema and copying same fmx in that runtime and trying to run ..It wont works.It throws error : Signature has been changed.

Later on i came to know that such error occurs jus becoz of 2nd parameter p_pass varchar2 default 'Y'.

View 1 Replies View Related

Forms :: Unable To Display A Message When Record Status Is Changed?

Jun 2, 2010

I have one requirement.i.e I want to display 'Do you want to save the changes you have made?[YES/NO]' message when record status is changed.In my form if i enter some value to the actual qty(db item) and press 'x' button it does't prompting 'Do you want to save the changes you have made?' message.

For displaying this message i have written following code in the APP_CUSTOM body:

IF (wnd = 'XXMZ_MRS_DET')
THEN
lv_wnd_stat := get_window_property('XXMZ_SUMMARY',VISIBLE);
if lv_wnd_stat = 'TRUE' THEN
IF :SYSTEM.form_status = 'CHANGED' THEN
CLEAR_BLOCK(ASK_COMMIT);
ELSE

[code]....

if i write above code in the app_custom body it's prompting the above message.But if i click 'YES' it does't save the records?

How can i save the records when i click 'yes'?

View 3 Replies View Related

Forms :: Master Detail Form - No Changes Occurred To Changed Record

Mar 4, 2012

MASTER-DETAIL FORM HAVING AN LOV IN THE MASTER .LOV SELECTS THE PRIMARY KEY FIELD FROM THE MASTER TABLE AND IN LOV PUSHBUTTON HAVING A TRIGGER WHEN BUTTON PRESSED

Declare
bool boolean;
begin
bool := show_LOV('PURCHASELOV');

[code]...

WHEN SELECTING THE ITEM THROUGH LOV IT EXECUTES ALL VALUES BUT AFTER CHANGING ANY DATAS THEN NEW RECORD IS CREATED IN THE MASTER TABLE AND NO CHANGES OCCURED TO THE CHANGED RECORD.

View 4 Replies View Related

Forms :: Show_view Taking So Much Time In 10g

Mar 21, 2011

I have one big form where the first canvas (content) is taking nearly 20 seconds to display. this is in web mode using forms 10g.

i have tried using SHOW_VIEW(find_view('SAMPLE')) but still no improvement.

View 5 Replies View Related

Forms :: 10.1.2.0.2 Taking More Time To Load On Some Machines

Mar 31, 2010

Some of my forms taking to much time while loading on some machines but same forms working fine on other machines with same configuration.

Forms, version: 10.1.2.0.2, Clients: Win_XP_Pro, App Server: Window 2003 Server, IE7, Jinit 1.3.1.26

View 3 Replies View Related

Forms :: Is There Text Changed Trigger With Text Item Function

May 5, 2010

Is there text changed trigger with text item function like when_list_changed trigger of list item?

View 7 Replies View Related

SQL & PL/SQL :: Summary (Row To Column)

Jun 1, 2011

SQL summary for below data:

Table: temp_user_access
NAME Null? Type
------------------------------- --------- -----
USERGROUP VARCHAR2(255)
USERNAME NOT NULL VARCHAR2(40)
NICKNAME VARCHAR2(40)
AAACC VARCHAR2(70)
SYSTEM VARCHAR2(10)

I need the expected result as per attached photo

View 23 Replies View Related

How To Find Summary Value By Range

Jul 22, 2011

this is my table

create table sequence ( id int not null primary key);

insert into sequence(id) values
(1), (2), (3), (4), (6), (7), (8), (9),
(10), (15), (16), (17), (18), (19), (20),(22);

i need the answer to group the sequence like this

start_number | end_number | count
1 | 4 | 4
6 | 10 | 5
15 | 20 | 6
22 | 22 | 1

what should i do?

View 1 Replies View Related

SQL & PL/SQL :: How To Find Summary Value By Range

Jul 22, 2011

this is my table

create table sequence (
id int not null primary key
);

insert into sequence(id) values
(1), (2), (3), (4), (6), (7), (8), (9),
(10), (15), (16), (17), (18), (19), (20),(22);

i need the answer to group the sequence like this

start_number | end_number | count
1 | 4 | 4
6 | 10 | 5
15 | 20 | 6
22 | 22 | 1

what should i do?

View 7 Replies View Related

SQL & PL/SQL :: Summary Column To Details?

Sep 25, 2011

I have one table which has two columns name,qty and it has data like arif,3 pcs i want to display it in 3 lines if the qty is 3 and in 2 lines if the qty is 2 using sql query

View 6 Replies View Related

Database - Summary Of Sales By Quarter?

Nov 30, 2010

I brought in the Northwind database 2003 in to SQL Developer. I was looking at the view 'Summary of Sales by Quarter' But this report brings in everything. It doesent give me summary of sales for Qtr1, Qtr4 etc

These are the columns:

ShippedDate
OrderId
Subtotal
CREATE OR REPLACE FORCE VIEW "NORTHWIND"."SUMMARY_OF_SALES_BY_QUARTER" ("SHIPPEDDATE", "ORDERID", "SUBTOTAL")
AS

[code]....

How can i recreate this view to show me summary data for qtr1, qtr2, qtr3 and qtr 4 for the year 1997??

View 1 Replies View Related

SQL & PL/SQL :: Summary Report From Detail Table

Mar 26, 2012

I have been sweating on this since the weekend.

My source table

SELECT
'182383' EMPLOYEE_NO
, 'ABACUS' FULL_NAME
, 'ADMIN' DEPARTMENT
, 'ADMIN' PREV_DEPARTMENT
, TO_DATE(20090104,'YYYYMMDD') EMP_START_DATE

[Code]....

EFFECTIVE_START_DATE: SCD field, Date ABACUS moves from one department to another.

EFFECTIVE_END_DATE: SCD field, Date ABACUS left the department from another. To keep history of movement.

The sample report shows possible scenario on my data.

I want to build monthly report to cater from departmental headcount on monthly basis, starting from from ABACUS start date.

see sample report below

MONTH | DEPARTMENT |NEW_HIRES | RELOCATION (OUT) | RELOCATION (IN) | NET TOTAL PREV MONTH | NET TOTAL PRESENT MONTH |
WHERE
MONTH: REPORT MONTH
DEPARTMENT: THE DEPARTMENTS IN THE ORGANIZATION
NEW_HIRES: NUMBER OF NEW STAFFS HIRED THAT MONTH BASE ON EMP_START_DATE
RELOCATION_OUT: NUMBER OF STAFFS MOVEMENT TO ANOTHER DEPARTMENT (EMP_END_DATE IS NULL, EFFECTIVE_START_DATE AND

[Code]....

View 4 Replies View Related

SQL & PL/SQL :: Procedure To Calculate Summary Session?

Aug 13, 2013

I have a below requirement from client.

Create a procedure generate_daily_session_summary that will read the pcm_session_summary (pk sess_id) table and create a per day summary in the pcm_session_summary_daily table.

1. Summarize all records from pcm_session_summary for session start timestamp (START_TS) greater than the max existing SESS_DT from pcm_session_summary_daily table and less than the start of current day. Insert the records into the pcm_session_summary_daily table.

2. Populate the fields in pcm_session_summary_daily as follows :

sess_dt - truncated date from pcm_session_summary.start_ts unique_user_cnt - count of unique cws ids encountered in that day, sess_cnt number - count of total sessions in that day , max_concurrent_sess_cnt number - maximum number of concurrent sessions at any point of time in that day. Concurrent sessions are defined as those that have overlapping start_ts or end_ts - sessions that were active at the same moment in time would be concurrent with each other.

3. The procedure will be scheduled to run every day in a batch job and will summarize session data until the end of the previous day

I have the table with below details.

desc PCM_SESSION_SUMMARY
Name Null Type
---------- -------- ------------
SESS_ID NOT NULL NUMBER
USER_CUPID VARCHAR2(10)
START_TS TIMESTAMP(6)
END_TS TIMESTAMP(6)
ACT_CNT NUMBER

[code]....

I have written the below query to get the result for question no:1

select trunc(start_ts,'DDD') start_ts,count(distinct(user_cupid)) user_cnt,count(SESS_ID) Sess_cnt
from PCM_SESSION_SUMMARY
where START_TS < sysdate or START_TS > (select max(sess_dt) from pcm_session_summary_daily where sess_dt < sysdate)
group by trunc(start_ts,'DDD')
order by start_ts;

However i tried a lot but not sure how to get maximum concurrent session count for a day.One of my friend comment below.

The Pcm_session_summary_daily is empty so you need to handle nulls when doing max. That will fix the issue of no results for the Greater Than condition.

You need to get concurrent count of sessions with respect to one another, the query that you have will not work. Do it in PL/SQL using procedural logic. The queries would return multiple rows, you need to handle that.

View 3 Replies View Related

PL/SQL :: An Extra Parameter For Summary Function

Dec 19, 2012

Why cant oracle give an extra parameter for summary function like MAX and MIN...For example

select max(salary,2)
from empWill give the second max salary.

View 11 Replies View Related

SQL & PL/SQL :: Strange Cost - Summary Lower Than Ingredients?

Aug 1, 2012

I've been experiencing strange Oracle behavior from time to time when using "explain plan". what could be the reason? (I'm going to create an Oracle ticket when I could find the cause...)

The total cost of a query was low (ex. ~500) while sub-parts of the query has high cost (ex. ~10000).I don't want to provide the query itself as the issue is observed for huge queries (like 2M characters!).The execution plan looks like this:

+- SELECT STATEMENT , ALL_ROWS, Cost 736
|
+--+- WINDOW SORT , Cost 736
|

[code]...

View 5 Replies View Related

Reports & Discoverer :: Creating Summary Folders

Apr 9, 2013

we have just upgraded discoverer from 3.1 to 4.1

and we click on create summary folders we got this error Summary management not available because : this user has no privilige or quota to create materialized view in the current schema External summary registeration not available because : this user has no privilige or quota to create materialized view in the current schema

altough i granted privilige for materialized view

View 1 Replies View Related

Reports & Discoverer :: Detail And Summary In One Report

Aug 25, 2012

I have one group wise report and my requirement is i need to print both the Outputs in one single report first, is group with details and the summary in the last page showing machine code and summary of qty as totals ,I have given below test case .

create table ot_cut_detail (mach_code varchar2(12),batch_code varchar2(12),pos_no varchar2(12),pos_qty number)

insert into ot_cut_detail values ('L1','01','1001',2);
insert into ot_cut_detail values ('L1','01','1002',2);
insert into ot_cut_detail values ('L1','01','1003',2);
insert into ot_cut_detail values ('L2','01','1004',2);
insert into ot_cut_detail values ('L2','01','1005',2);

SQL> SELECT * FROM OT_CUT_DETAIL;

MACH_CODE BATCH_CODE POS_NO POS_QTY
------------ ------------ ------------ ---------
L1 01 1001 2
L1 01 1002 2
L1 01 1003 2
L2 01 1004 2
L2 01 1005 2

--Detailed output is like this as below

MACH_CODE BATCH_CODE POS_NO A
------------ ------------ ------------ ---------
L1 01 1001 2
1002 2
1003 2
L1 Total 6
L2 01 1004 2
1005 2
L2 Total 4
Grand 10

--Summary report will be as below both in one report.

MACH_CODE BATCH_CODE totals
------------ ------------ ---------
L2 01 4
L1 01 6

View 14 Replies View Related

Multi Table Query For A Summary Cost?

Aug 24, 2007

I'm wanting to create a query that will give me a summary of parts and labor from work orders. However there are three tables. work_order, parts, labor. Sometimes there will only be parts, sometimes just labor, or sometimes both. Well my query will only return results when they are on both. Sample query is below. Do I need to create a temp table to gather the data or is there a way to do this with a sub query.

select work_order.wono, sum(parts.cost), sum(labor.cost)
from work_order, parts, labor
where
work_order.wono = parts.wono and
work_order.wono = labor.wono
group by work_order.wono;

View 5 Replies View Related

Server Utilities :: Trapping SQL Loader Summary Counts

Jun 30, 2011

I have got another curly one with regard to Sql Loader. My original issue via [message #513696] was resolved. In summary, SQL Loader opens a comma delimited csv file and it is able to successfully populate the appropriate Oracle table. However, during the run to process each unique csv file, SQL Loader produces a both a .log file (indicating what transpired during the load) and a .bad file of the records from the csv file that where rejected by SQL Loader.

the users have requested that "is it possible to update a separate table of the summary results of what went wrong and what was right?" It just so happens that the csv file contains some summary records (rows) with processing audit infor...as the following .bad file wrote out....
___________________________
ModuleID,ModuleSN,Lat,Lon,GMT Time,Tag Count,GMT Date,Client,Farm,Field,Variety,Machine
No Module ID ,No SN ,-30.178958,149.63844,9:55:58,0,21/04/2011,101,Widgen ,9,71BRF ,5987
3500B9880611170260179BFB,10202094587,-30.199379,149.661333,7:10:35,2,22/04/2011,101,Widgen ,30,71BRF ,5987
,,,,,,,,,,,
Total Modules,1602,,,,,,,,,,
Mis-reads,1,,,,,,,,,,
Mis-read %,0.06,,,,,,,,,,

1. The first record (starting in the 1st postion is "ModuleID") is a heading record in the csv file and can be disregarded.
2. The secord record (starting in the 1st postion is "No Module ID") is an error record in the csv file and can be disregarded.
3. The third record (starting in the 1st postion 3500B9880611170260179BFB, ) is a valid record, however, is was rejected as it is a duplicate of a preceeding record ...and the log indicates ...

Record 124: Rejected - Error on table PTLIVE.MODULE_CSV_LOADS.
ORA-00001: unique constraint (PTLIVE.MODULE_SERIAL_NUMBER_UK) violated

4. The fourth record (starting in the 1st postion is ,,,,,,,,,,,
) is a blank record in the csv file and can be disregarded.
5. The fifth record (starting in the 1st postion is "Total Modules" has a value of 1602 which I need to capture to write into a separate table.
6. The sixth record (starting in the 1st postion is "Mis-reads" ) has a value of 1 which I need to capture to write into a separate table.
7. The last record in the csv file and can be disregarded.

The summary Oracle table is
CREATE TABLE PTLIVE.SUBMODULES_SUMMARY
( IMPORT_CSV_FILE_NAME VARCHAR2(256 ),
TOTAL_SUBMODULES_LOADED NUMBER (5),
TOTAL_SUBMODULES_MIS_READ NUMVER (5),
DATEIMPORTED DATE default SYSDATE
)

Now I would like to trap the value 1602 and load that into the Oracle column TOTAL_SUBMODULES_LOADED and the value 1 and load this into TOTAL_SUBMODULES_MIS_READ.

The name of the csv file is known and I can (as the previous [message #513696] resolved) simply use a SQL Loader control file command > IMPORT_ CSV_FILE_NAME CONSTANT "Batch_2011Jun29_TEST.csv".

View 2 Replies View Related

Reports & Discoverer :: Calculation Based On Summary Item?

Sep 8, 2013

See my data

Location--------Employee-------------Sales-----------------------Sales per emp
1------------------ 4-----------------------100------------------------------25
2------------------ 5-----------------------120------------------------------20
3------------------ 7-----------------------210------------------------------30
Total---------------16-----------------------430-----------------------------27

The total 27 achieve by (430/16)=27 How can I get using ORacle BI Discoverer 11g Desktop

View 7 Replies View Related

Server Administration :: How To Monitor Instance Status And Log Switch Summary

Apr 27, 2012

how can i monitor the instance status and log switch summary.

View 8 Replies View Related

Forms :: One Lov For Different Field

Feb 22, 2011

i want to call same lov for 3 diff. field.....if possible how can i call it...because while desiging lov , returns item only 1 out of 3 field..how can it possible.

View 1 Replies View Related

Forms :: Format For SSN Field

Jul 16, 2010

I have a ssn field where the user enter value to search for the ssn. I want to format the field so the user can enter in the xxx-xx-xxxx format only. If the user enters a wrong format and tries to search i should prompt a message saying wrong format. How can i achieve this.

View 3 Replies View Related

Forms :: 4.5 - Change Value Of One Of The Field

May 24, 2010

I have been asked to support an application which was developed in Forms 4.5. I have experience in Oracle database but I'm almost zero in any front end development.

As a first task I have been asked to remove a couple of field from one of the screen and then change the value of one of the field.

View 4 Replies View Related

Server Utilities :: Field In Datafile Exceeds Maximum Length For Number Field?

Apr 23, 2010

Even though i am using COL1 CHAR(500) NULLIF COL1=BLANKS, then also i am getting same error for those columns.

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved