How to calculate the sum (discount) when check box status = 'Y '.

Hai.
It's Vinet I want sum (disc) of particular elements check box STATUS = 'Y'
I selected the quota_det TABLE data

I have 5 codes elements
SNO Agenda ITEMCODE QTY. BASIC PRICE DIS_PER DISK STATUS

1 DELL 2 30000 60000 5 57000 D26OO Y

2 HP HP2300 1 20000 20000 2 19600 N

3 SAMSUNG SM560 2 5300 10600 3 10282 N

4 NOKIA 5 25600 128000 3 125440 NK63 Y

5 HTC 1 2300 2300 2 2254 HT25 Y


ALL ARE ELEMENTS of DATABASE BUT STATUS IS NOT a basic ELEMENT of DATA THAT IS the POINT of the BOX

VALUE CHECK = Y
A VALUE WHEN UNCHECK = N

IN above DATA I WANT ONLY ELEMENTS SUM (DISC) WHEN the POINT of the BOX CHECK THAT the SUM SHOULD BE APPEAR IN TOT_VALUE * POINT *.

SEND ABOVE CODE REQUIREMENT WITH THE NAMES OF TRIGGER ITS URGENT...

Published by: 988532 on March 22, 2013 22:27

Hi Vincent!

You can try this!

Make another text point something as a disc_copy between the disc and on the same block
below this text element properties
1 piece of data: No.
2. data type: number
3 canvas: Null

Create another element of text like total_discount below the properties

1 piece of data: No.
2. data type: number
3 method of calculation: summary
4. function: sum
5. block of summaries: YourBlock
6 point summaries: disc_copy

If you are multi block record is then
7. number of items: 1

Set property YourBlock
All records in the query: Yes

Now, about the situation to apply trigger WHEN-CHECK-BOX-CHANGED and write below the code in this trigger

if :YourBlock.status='Y' then

     :YourBlock.disc_copy:=:YourBlock.disc;
else
     :YourBlock.disc_copy:=0;
end if;

Published by: XeM on 23 March 2013 12:06 AM

Published by: XeM on 23 March 2013 12:07 AM

Tags: Oracle Development

Similar Questions

  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

  • How to calculate the sum of the fields to fill?

    Hello!

    My question is how can I calculate the sum of filled areas?

    For example, in a PDF document, I have a few fields that must be filled out with name and surname and the end of the document, another field that is the sum of the fields "FullName" which shows how many people is in this document. The operation should not take into account white/empty areas.

    Now, I know that I could do with the simple calculation "(+) sum" but I have to put a '1' for each of this area and I would like to avoid this.

    Yes, it's the first option I described. In this case, you can use this code:

    var total = 0;
    for (var i=1; i<=79; i++) {
        if (this.getField("Nume si prenume "+i).valueAsString!="") total++;
    }
    event.value = total;
    
  • How to select the values for each check box in a group of records

    Hello

    I have a requirement in form 10g. In this form there are 10 records are display each record has a checkbox is there if I click on the check box save number one and number three and make some changes in the text field (field adjustment is the number data type) and then finally, I want to see the total a total amount called field.

    In this, my question is how to select specific to a group of records records? and finally these selected records are inserted in a table.
    Because I am not able to read these records at a time.
    Is there any table to define a record group to fetch each of them individually for example Rec [1] Rec [2]... like this if yes please suggest me the steps how to do this.

    Thanks in advance
    Prasanna

    Published by: user10315107 on December 17, 2008 23:44

    OK, so you want to shoe the total amount in the form itself (I guess that somewhere under the dashboard lines?).

    You can do this easily using formulat elements:

    1 create a new item in your block where the field amount is places, set "section of the database" on the 'No', 'calculation mode' to the 'formula' and the 'formula' himself to something like:

    CASE WHEN :BLOCK.CHECKBOXITEM=CHECKVALUE THEN :BLOCK.AMOUNT+:BLOCK.ADJUSTMENT ELSE 0 END;
    

    This formula returns 0 if the checkboxitem is not checked, otherwise the sum of amount and adjustment (of course you can adjust the names of elements and the value for 'Checked')
    2. place the element in the layout, if you wish.
    3. set the property "Query all Records" to "true" for your block elements, this is necessary for the calculation to work
    3 create a control block to keep summary article in a, "Single Document" set to 'True '.
    4. place a new element in this control block, set 'Calcuation mode' to 'Summary', 'Summary block' to your block elements, 'Summary point' in newly created formula section in the block elements
    and function of synthesis for the "sum".
    5. place the element in the layout

    She's.

  • How to calculate the sum of the numbers in a table...

    So my table contains brands for a fictitious class and I need to be able to calculate these brands to give me an average of class which is this formula; all brands added / number of brands. Is there a way to do this in a table?

    My code for the program so far is:

    Create table
    var brands: Array = ["100" '76', '80', '54', '23'];
    Function key
    enter_btn.addEventListener (MouseEvent.CLICK, onClick);
    function onClick(event:MouseEvent):void {}
    Declare required variables
    var brand: Number;
    markIn var: String;
    Retrieve data from TextField
    markIn = markIn_txt.text;
    brand = Number (markIn);
    Table
    Marks.push (markIn_txt. (Text);
    trace (Marks);
    }

    Add a listener to mouse for the sorting of the brands
    sort_btn.addEventListener (MouseEvent.CLICK, onSort);
    function onSort(event:MouseEvent):void {}
    Matrix display and sorting
    marksort_txt. Text = marks.sort (Array.NUMERIC);
    }

    Add a listener for mouse for analyizing brands
    analysis_btn.addEventListener (MouseEvent.CLICK, onAnalysis);
    function onAnalysis(event:MouseEvent):void {}
    Determine the middle class

    NOTE: I had this total = total + Number (mark [k]); inside a loop but it doesn't seem to work...

    Maybe something like that might work for you.

    var brands: Array = ["100" '76', '80', '54', '23'];

    var totalMark:Number = 0;
    var avgMark:Number = 0;
    var markCount:uint = 0;

    for (var i: int = 0; i
    {
    var mrk:Number = parseInt (marks [i]);
    If (IsNaN (MRK)) {continues ;}
    markCount ++;
    totalMark += mrk.
    }
    avgMark = totalMark/markCount;

    trace (Marks);
    trace (totalMark)
    trace (avgMark)

  • How to calculate the sum of the values of some columns in a table

    Hello

    I want to get the column just the average of the values of some columns not all columns of the table.what I have to change exactly in this block diagram.even if the table size is 25 average, I want the division as the number of values in each column (= number of lines)

    just like that:


  • How to calculate the required pace when I need to scan the surface of 1 meter moving at 0.5 meter/second

    I need to analyze a surface of the mobile object with a camera.

    My question is: the object surface is 1 meter in length and image size of my camera picture is 2048 * 2048, then, what is the frequency of images I need?

    My mapping is 1 mm = 10 pixels

    so 1000 mm = 10000 pixels

    Is is like 10000 pixels / 2048 pixels = approximately 5 frames?

    Is - this law to determine the frames per second?

    Thanks in advance

    You confuse your pace and your total number of frames.

    Rate: the speed is 500 mm/s.  Each frame contains 200 mm.  500 mm/s / 200 mm = 2.5 frames per second.

    Number of images: length is 1000 mm.  Frame is 200 mm.  1000 mm / 200 mm = 5 frames.

    If you need photos at 2.5 frames per second for 2 seconds to get 5 frames.

    Of course, this assumes no overlap.  In practice, it's a good idea to have overlapping slightly if you have no flaws just at the edge of your image.  That's also assuming that you can move your object to exactly 500 mm/s.

    Bruce

  • How to calculate values that have a checked box beside them?

    Hi people,

    I'm new to Acrobat forms and have recently completed a complicated shape of the 7 page for a client and I'm very happy with it.

    But the customer comes back with the following query:

    They want checkboxes next to a series of values and, when a checkbox is checked, he added only makes TICK value. To show what I mean, please see the image below.

    sample.jpg

    So basically, there is a field at the side left (current monthly repayments) that cuts through all the values - in my example, this amounts to $50,00. Then, there is a field on the right side (repayments monthly future) to tally only values that have a checked 'yes' box to check next to them. In my example, this would produce a score of $20.00.

    Does anyone know how this could be done?

    Thank you

    Sorry, that line must be:

    CB = getField("CashFlowCheck"_+_i).valueAsString;

  • How to disable the backup works when you print an email?

    How to disable the backup works when you print an email.  Whenever I try to print an e-mail, save it as a PDF is displayed.  I then have to save, then open the file to print.

    Hello

    Thanks for posting your query on the Microsoft Community.

    To disable this feature, you need to uninstall Adobe reader and then check if still back you the question quickly.

    Kind regards

    Jesinta Rozario

  • How to calculate the size of HFM Cube in SQL Server 2005

    Hello

    How to calculate the size of the HFM Cube in SQL Server2005

    Under application used to Oracle. So what's application to SQL Server?

    ***********************************************************************************************************
    SQL > select sum(bytes/1024/1024) from dba_segments where nom_segment like 'FINANCIAL_ %' and owner = 'HFM;
    SUM(BYTES/1024/1024)

    SQL > select sum(bytes/1024/1024) from dba_segments where nom_segment like FINANCIAL% HSV' and owner = 'HFM;

    SUM(BYTES/1024/1024)
    **********************************************************************************************************

    Concerning
    Smilee

    What is your goal? The subcube in HFM is a concept that applies to application layer - not so much to the database layer. The size of the subcube is the unique number of sheets (data values for January - December inclusive, for example) for the given entity, a triplet of currency or node Parent.Child. Should be considered for accounts of parent and customs that do not exist in the database, but are calculated in the RAM of the application layer.

    So if your goal is to find the largest subcubes, you could do this by querying the database and by counting the number of records per entity value (tables DCE) or combination of entity parent.child (tables of the DCN). I am not versed in SQL, but I think the script below you would just the size of the pattern and not the sizes of subcube.

    See Accelatis.com for a third party software product that can do it for you. The function is called the subcube Analyzer and was written by the same team that wrote HFM, then they should know how :-)

    -chris

  • Beginner problems - how to make the sum of the lists in a drop-down table

    Hello

    Please forgive my newness but I'm creating a table with 10 + lines and columns and need to calculate the sum of the columns. The user must select a number from a drop-down list and I would like to summarize these nbumbers at the bottom of the column, seems simple enough...

    I have named each cell in the links tab but can't seem to find the script of the sum on the right. I just started using livecycle and have had a good experience so far.

    I wish it was like excel where you just need to click or highlight the cells you want to summarize and do with it but I can't seem to find the easy button...

    You can not simply highlight a column, name it and then use that name in a script to sum?

    Thanks a lot for all the help and I have looked around, but can't get a grip on this one, so I apologize if this is requested before.

    Go easy on me.

    You have to be very accurate with referencing the fields or the formulas will not work. If you have renamed the fields of their default values, then you should reference them as you named the.

    Here's an example of my hierarchy, called as you explained:

    In this case, the use of scripts on the Total field will look like this:

    this.rawValue = (Row1.A1.rawValue * 1) + (Row2.B1.rawValue * 1) + (Row3.C1.rawValue * 1) + (Row4.D1.rawValue * 1);

    So that when I switch to preview, it behaves correctly:

  • How to get the sum of the first row in the previous row?

    Dear gurus... I need to get the sum of a column of the first row of my result set to the previous line based on a condition. I read analytical functions for this but they provide the sum of the first rank to Current Row through declaration "rows between Unbounded preceding and current line. Y at - it a statement that calculates the sum as "rows between Unbounded preceding and previous row?

    Hello

    kamranpathan wrote:
    Dear gurus... I need to get the sum of a column of the first row of my result set to the previous line based on a condition. I read analytical functions for this but they provide the sum of the first rank to Current Row through declaration "rows between Unbounded preceding and current line.

    If you do not explicitly give a windowing clause, then you get the default windowing clause you indicated.
    If you want another clause of windowing, ionclude in the analytic function call.

    Y at - it a statement that calculates the sum as "rows between Unbounded preceding and previous row?

    Yes. The correct syntax for "Previous rank" is «PREVIOUS 1»

    ...  ROWS BETWEEN  UNBOUNDED PRECEDING
                AND        1          PRECEDING
    

    For more information, search for "Analytic Functions" in the manual of the SQL language:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17118/functions004.htm#sthref917

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.
    You will find the answers better faster if you always provide this information whenever you post a question.

    Published by: Frank Kulash, Sep 17, 2011 17:04
    I just saw Etbin responses.
    As usual, Etbin has a good point. If the column that you are basically cannot be NULL, then it is probably easier to subtract the total current line and use the default windowing clause.
    Even if it can be null, you find may be easier to use this approach.

  • CALCULATE the sum of the amounts?

    Hey guys!

    This script:
    CLEAR      COMPUTES 
    CLEAR     BREAKS
    
    SET     feedback     off
    SET     pagesize     5000
    SET     linesize     50
    SET     echo          off
    SET     heading          on
    SET     verify          off
    
    COLUMN     User format     A8
    COLUMN     Files format     999999999
    COLUMN     Docs format     999999999
    COLUMN     Pages format     999999999
    
    COMPUTE SUM LABEL TOTAL OF "FILES", "DOCS", "PAGES"
    
    PROMPT     ************************************************** 
    PROMPT     *         Monthly File Activity by User          *
    PROMPT     ************************************************** 
    PROMPT      
    PROMPT      
    ACCEPT     StartDate     DATE FORMAT 'MMYYYY'      PROMPT 'Enter the month and year (MMYYYY): '
    PROMPT     
    PROMPT      List of users:
    PROMPT      One
    PROMPT      Two
    PROMPT      Three
    PROMPT      Four
    PROMPT      Five
    PROMPT      Six
    PROMPT      Seven
    PROMPT     UNKNOWN
    PROMPT       
    PROMPT     Type 'ALL', or leave blank, to select all users.
    PROMPT      
    ACCEPT     UserChoice     DEFAULT 'ALL'     PROMPT 'Please enter a user: '
    
    
    SELECT
         (CREATOR_ID
                       WHEN     '1'     THEN     'One'
                     WHEN     '2'     THEN     'Two'
              WHEN     '3'     THEN     'Three'
              WHEN     '4'     THEN     'Four'
              WHEN     '5'     THEN     'Five'
              WHEN     '6'     THEN     'Six'
              WHEN     '7'     THEN     'Seven'
              ELSE     'UNKNOWN'
              END)     "USER",
         count       (distinct(substr(DOC_NAME,1,9))) AS Files,
         count     (DOC_IMAGE) AS Docs,
         sum     (DOC_PAGE) AS Pages
    FROM
         TABLE1,
         TABLE2
    WHERE
         DOC_DATE to_date('&StartDate','MMYYYY') AND last_day(to_date('&StartDate','MMYYYY'))
    AND
         CREATOR_ID not in ('Thing','8','9')
    AND
         ((CREATOR_ID
                       WHEN     '1'     THEN     'One'
                     WHEN     '2'     THEN     'Two'
              WHEN     '3'     THEN     'Three'
              WHEN     '4'     THEN     'Four'
              WHEN     '5'     THEN     'Five'
              WHEN     '6'     THEN     'Six'
              WHEN     '7'     THEN     'Seven'
              ELSE     'UNKNOWN'
              END) = UPPER('&UserChoice')
         OR
         '&UserChoice' = 'ALL')
    GROUP BY
         CREATOR_ID
    /
    produces this result:
    USER          FILES       DOCS      PAGES
    -------- ---------- ---------- ----------
    One             261       4276      18124
    Two             364       5954      26913
    Three           109       1996       8243
    Four            178       3635      14554
    Five            104       2657      11662
    Six             308       6639      27887
    I would like for a labeled sum TOTAL at the bottom of these figures. I thought that COMPUTE would take care of this, but it's not. Am I missing something? It will not add these to the top because they are already money from specific users? Insight? I'm new to SQL and would like to be pointed in the right direction. Thanks for your expertise!

    I'm on a 10g system.

    Calculation is not SQL and SQL * more.
    The general syntax is
    calculate the sum of... the * | * report

    followed by
    break the report
    When this is necessary.

    -----------
    Sybrand Bakker
    Senior Oracle DBA

  • How to calculate the ckptLogVolume?

    Hello:
    I have a question about control, our policy of ckeckpoint is 10 minutes or volume of data has come up to 1 G, but from the ckpthistory, we can see sometimes it does not respond to volume 10 minitues or 1 G. How to calculate the ckptLogVolume? If we see the result ckpthistory? If possible, which column? Thank you...

    call ttCkptConfig;
    < 600, 1024, 0 >

    call ttckpthistory;
    < 15:26:50.539519 2009-05-15, 2009-05-15 15:26:55.524454, fuzzy, completed, Checkpointer, < NULL >, 1, 99, 247909568, 82508, 4294967296, 81197, 1750236928, 15457, 301826504, 327339272, < NULL > >
    < 15:17:20.577626 2009-05-15, 2009-05-15 15:17:20.857039, static, final, Subdaemon, < NULL >, 0, 97, 242211472, 81004, 4294967296, 79563, 1686897608, 20, 1573232, 1618112, < NULL > >
    < 15:16:49.203124 2009-05-15, 2009-05-15 15:16:55.300502, static, final, Subdaemon, < NULL >, 1, 97, 242211320, 81004, 4294967296, 79563, 1686897608, 13070, 280099880, 239440672, < NULL > >
    < 15:16:21.659487 2009-05-15, 2009-05-15 15:16:28.507656, static, final, Subdaemon, < NULL >, 0, 97, 242211168, 81004, 4294967296, 79563, 1686897608, 14441, 307440952, 265360008, < NULL > >
    < 15:11:38.139007 2009-05-15, 2009-05-15 15:11:43.322764, fuzzy, completed, Checkpointer, < NULL >, 1, 96, 80730544, 81450, 4294967296, 80193, 1726321176, 14842, 308879240, 321674504, < NULL > >
    < 15:08:18.118181 2009-05-15, 2009-05-15 15:08:23.100922, fuzzy, completed, Checkpointer, < NULL >, 0, 94, 79302232, 81558, 4294967296, 80382, 1737702968, 15017, 311253288, 334736648, < NULL > >
    < 15:05:00.002139 2009-05-15, 2009-05-15 15:05:05.081461, fuzzy, completed, Checkpointer, < NULL >, 1, 92, 76043440, 81559, 4294967296, 80386, 1737962016, 15053, 311957568, 335301896, < NULL > >
    < 15:01:41.882166 2009-05-15, 2009-05-15 15:01:46.959502, fuzzy, completed, Checkpointer, < NULL >, 0, 90, 74032552, 81594, 4294967296, 80425, 1740156304, 15008, 311831160, 337583368, < NULL > >

    Checkpopint operations which are drivern by the volume of interval and log checkpoint are those that are 'Checkpointer' in the output of ttCkptHistory. Control points can also occur for other reasons, for example when the data store is stopped, when it is loaded in memory and recovery is necessary. These kinds of control point are marked as "Static" and "Subdaemon". You can see three of those in the output.

    The output, it seems you're checkpointing about every 4 minutes. Assuming the target settings (interval 600 seconds, Journal volume of 1 GB) were already in place at the time of these control points has occurred then it seems that all of these were led by the volume of the journal rather than the checkpoint interval (that you generate ~ 1 GB of log about every 4 minutes).

    Chris

  • How to prevent the add-on compatibility checking whenever he opens Firefox?

    How to prevent the add-on compatibility checking whenever he opens Firefox?

    Which can be a problem with the compatibility.ini file in the Firefox profile folder.
    Try to rename (or delete) the file compatibility.ini in the profile folder of Firefox to see if that helps.

    You can use this button to go to the Firefox profile folder currently in use:

    Alternatively, you can check for problems with preferences.

    Delete possible user.js and files numbered prefs-# .js and rename (or delete) the file prefs.js to reset all the prefs by default, including the prefs set via user.js and pref which is no longer supported in the current version of Firefox.

Maybe you are looking for

  • J6450 wireless in Vista 64 and XP 32/Vista 32 environment

    I installed my Office Vista 64 and reconfigure the J6450 to run infrastructure wireless with 2 laptops running XP 32 and 1 laptop running Vista 32. I have had no problem the printer and the conduct of Vista 64 but I couldn't share the printer with la

  • Wireless driver on HP Envy 17 1195eo

    Hello. I just had to want again and wanted to reinstall windows 7, to get rid of all the pre-installed software. After I reinstalled it, windows 7 has not been able to download the drivers it self so I had to do it manually. So I did and now I had tw

  • Five tries and still impossible to update.

    February 2, 2009 was offered an update.  Microsoft .NET Framework 3.5 Service Pack 1 and the .NET Framework 3.5 Family update (KB951847) x 86.  Five times in recent weeks, I tried to update and every time I get an error code 80070026. Vista Ultimate.

  • How can I open another browser window

    I don't see how to open a new browser window without killing the current I opened since the ICS update. Am I missing something?

  • IPSec vpn cisco asa and acs 5.1

    We have configured authentication ipsec vpn cisco asa acs 5.1: Here is the config in cisco vpn 5580: standard access list acltest allow 10.10.30.0 255.255.255.0 RADIUS protocol AAA-server Gserver AAA-server host 10.1.8.10 Gserver (inside) Cisco key A