Solved

Calculate Sum of Field and populate list error

Posted on 2004-03-22
2
754 Views
Last Modified: 2013-12-12
hi!
    I have a tabular foRm having a fields TASK, UPL_STT, SK, INVOICE_NUM and QTY..name of my block is UP_F.. I created LIST ITEMS named LB_STAT_LIST (to filter UPL_STT), LB_INV_LIST (to filter INVOICE_NUM) and LB_SKU_LIST (to filter SKU's only)...now what i want to do is i want to get the sum of QTY when I choose specific SKU IN LB_SKU_LIST...how will i do this in run time...i have checked the help and i can't get it...could you give me steps or example?

and another thing...

I am dynamically inserting values from the DB
into a Oracle forms list item.

Its working when the data type of the list item is set to char. But when I change it to a Date datatype or a Number datatype to suit the column fields accordingly, I am getting this error :

FRM-41335 : Populate_List : invalid column type
for column 1.



Regards
0
Comment
Question by:GoodHands_Delphi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 10655434
"and another thing..."
FRM-41335:
This is from the on-line helpp "POPULATE_LIST built-in"
Removes the contents of the current list and populates the list with the values from a record group. The record group must be created at runtime and it must have the following two column (VARCHAR2) structure:
Column 1:      Column 2:
the list label      the list value

so as you can see the column type must be VARCHAR2.

For your first question - use When-List-Changed Trigger:
Fires when an end user selects a different element in a list item or de-selects the currently selected element.  In addition, if a When-List-Changed trigger is attached to a combo box style list item, it fires each time the end user enters or modifies entered text.
0
 
LVL 6

Accepted Solution

by:
musdu earned 20 total points
ID: 10655798
Hi,

to get sum of QTY field, create a new numeric field in the same block and set the property of "Number Of Items Displayed" to 1 (this will create a single occurrence item). Then set the "Calculation Mode" property to "summary" and set "Summary Function" to "sum" and "Summarized Block" to "UP_F" and set "Summarized Item" property to "QTY" and this is last one :) set the "Query All Records" property of block UP_F to "YES". When you execute a query on your block, your field will be filled with sum of QTY field.

regards.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
populate value based on what is selected in lov 2 63
Oracle SQL-Queries on a RAC Database 3 40
oracle query 4 27
ORA-01843: not a valid month - use NVL 14 7
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question