Suppressing the first fields in a group

Post Author: jrock
CA Forum: Formula
Is there a way to use the onfirstrecord function in the field suppress formula?  I have a few fields that calculate and I do not want the first ones in the group calculating negative entries.  I thought about <=0 as an option, but I do not want to suppress entries that are not on the first line of the group.

Post Author: bettername
CA Forum: Formula
In group header, create a formula that initialises a variable:
whileprintingrecords;
numbervar x:=0
In the details section, place a formuila that increments the variable:
whileprintingrecords;
numbervar x:=x+1
Now conditionally suppress the details section/field (or use in your summarizing formula) using:
numbervar x<=3 //will suppress when in the first three rows in the group.
Bear in mind that this will not affect auto-generated group summaries, it'll only hid the section/field where it's in the first three lines.  You'll probably have to write your own group summary formula/running total if you don't want to include the first (x) lines in the total.
That would look like (suppress everything but the group footer formula):
In Group header:
whileprintingrecords;
numbervar x:=0;
numbervar total:=0;
In details/whatnot:
whileprintingrecords;
numbervar x:=x+1;
if x>3 then numbervar total:=total+
In Group footer:
whileprintingrecords;
numbervar total;

Similar Messages

  • Getting the first row for each group

    Hi Everyone,
    I have a query which returns a number of rows, all of which are valid. What I need to do is to get the first row for each group and work with those records.
    For example ...
    client flight startairport destairport stops
    A fl123 LGW BKK 2
    A fl124 LHR BKK 5
    B fl432 LGW XYZ 7
    B fl432 MAN ABC 8
    .... etc.
    I would need to return one row for Client A and one row for Client B (etc.) but find that I can't use the MIN function because it would return the MIN value for each column (i.e. mix up the rows). I also can use the rownum=1 because this would only return one row rather than one row per group (i.e. per client).
    I have been investigating and most postings seem to say that it needs a second query to look up the first row for each grouping. This is a solution which would not really be practical because my query is already quite complex and incorporating duplicate subqueries would just make the whole thing much to cumbersome.
    So what I really new is a "MIN by group" or a "TOP by group" or a "ROWNUM=1 by group" function.
    Can anyone help me with this? I'm sure that there must be a command to handle this.
    Regards and any thanks,
    Alan Searle
    Cologne, Germany

    Something like this:
    select *
    from (
       select table1.*
       row_number() over (partition by col1, col2 order by col3, col4) rn
       from table1
    where rn = 1In the "partition by" clause you place what you normally would "group by".
    In the "order by" clause you define which will have row_number = 1.
    Edit:
    PS. The [url http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions004.htm#i81407]docs have more examples on using analytical functions ;-)
    Edited by: Kim Berg Hansen on Sep 16, 2011 10:46 AM

  • What are the key fields used to group double orders in t-code SDD1?

    What are the key fields used to group double orders in t-code SDD1?
    Cheers,
    VT

    Hi,
    You can group the duplicate sales documents with the help of the following fields,
    Sold-To-Party,Document type,date and sales area details.
    Regards,
    Gopal.

  • Which shortcut can I use to move the highlight in a dialog box to the first field in the dialog box?

    I am working with FrameMaker 10. There used to be a keyboard shortcut  for moving the highlight to the first field in a dialog box. Without  this command I do not know how to move the highlight to the field I want  to modify. I assume the highlight is on a random field when my script  enters the dialog box.

    In iPhoto
    You need to switch Photo Stream on from System Preferences > iCloud not from iPhoto.
    See instructions here >  iCloud - Learn how to set up iCloud on all your devices.

  • Help! How do I get the cursor to start at the first field of my form?

    I've just built a dozen forms fo rour business with Acrobat 9 Extended and would like the cursor to start on the first field of the forms when the PDF is first pulled up.  I've looked everywhere, read all the Helps but can't find anything on how to make this happen.  Is this so easy I'm missing it or what?

    You're right, its not a big deal but its the little things that make life
    more interesting.
    Hey, thanks a lot for your help.  You're making me look smart and that
    really is a big deal.
    Regards,

  • I would like to fill up the following pages. If I fill up the first fields with some letters, they m

    I would like to fill up the following pages. If I fill up the first fields with some letters, they multiplay each other in several other fields, there I don't want them. Can you help me?

    You can't change that, and we can't either. It's an error in the creation of the form. ALL of the fields that "auto populate" have the same name and description, so when you fill one, the rest fill by default with the same info. You'll need to contact the author of the form and inform them of the error.

  • How to fix the first field or column in classical report while scrolling

    i want to know, how to fix the first field or column in classical report while scrolling
    horizontally. the first  should be constant when i scroll the report horizontally .
    please help me.
    it's urgent.

    Hi,
    Suppose your first field is itab-matnr.
    WRITE :/ itab-matnr.
    SET LEFT SCROLL-BOUNDARY.
    WRITE :/......."Remianing fields

  • How do I add a number from one field to another then clear out the first field

    In a form I am creating I have a field or a series of fields that have variable numbers in them. I would like to create another set of fields that when I click on a button (or some other method) will add whatever number is placed in another field to that first field.
    For example:
    Text1a is normally a variable field. I have another field (text2a)  that I input another number into. I normally add these two numbers together manually and the total replaces what was in Text1a.
    Text1a = 4, I enter in a 2 in Text2a, so now Text1a will become a 6. I would like to have it so that when I click on a button it automatically adds the two numbers together and then replaces the current number in Text1a with the new total and also clears out the number in Text2a.
    Note: Text1a and Text2a are columns where the next filed down is Text1b and Text2b and so on.
    Can someone please help me on this?
    Bruce

    If you have a nanoSIM that is for your cell provider just activate it and it should set it up.

  • Populating parts of form based on Value entered in the first field

    Hello,
    I am trying to create a form, where user will enter the serial number of his equipment and I want him to click a verify button next to it.Upon clicking the verify button I want the Item Description field of the form to be updated ( this info is pulled from a backend MySql DB).Also, the text fields corresponding to the Equipment Site to be populated.After checking all the info, user should be able to click a submit button at the end of form and this information should be written to another table.I attached a Insert record server behaviour to form.Essentially, I want to attach a different action to both buttons on the form.In my view this is same a when we fill those registration form and based on our country, our state drop down gets populated.It seems this is doable, but I am not able to figure out how.I would really appreciate any help
    Thanks

    This is very simple if you understand PHP code. Basically, you give the two buttons different names, and use PHP conditional logic to control what happens. Call one button "verify" and the other "insert". If you use the POST method, you control the script like this:
    if (array_key_exists('verify', $_POST) {
      // create a recordset to retrieve the details ready for display
    } elseif (array_key_exists('insert', $_POST) {
      // insert the details in the the new table
    If you're not comfortable coding PHP yourself, the easy way to do it with Dreamweaver server behaviors is to use separate pages. In the first page, just create a form for the user to enter the serial number. Use the GET method to send the serial number to a separate page. In the new page, use the URL parameter containing the serial number to create a recordset to populate the insert form. Then apply an Insert Record server behavior using the POST method to insert the details into a new table.

  • Selecting the first file from a group of opened files in Photoshop

    Hi, I've been digitizing microfiche with 200 or so pages photographed onto one image file, laid out in a grid pattern. I've been using actions in Photoshop to cut out one page, create a new file in Photoshop from that page, then return to the first, master file and do it again with the next page in the series. So when it is complete I have each individual page as an individual image file which I then save with a batch process. I've been doing this for a while and have managed to make it work but I always run into the problem, when creating this action again, of getting Photoshop to select that first master file each time instead of selecting just the previous file. I know I can get it to select the previous file, or the previous file -1, -2, -3, etc. I've somehow been able to get this to work in the past by creating an action that selects a large enough group back, like previous file -19 or something, and through some bug or sheer luck it has worked and will always select that first file. But it doesn't always work and it always takes some frustration to luck into it when it does. Now I can't seem to get it to work at all. Is there a straightforward way I can simply tell it to select the first file everytime? If not, does anyone know how or why the method I used previously sometimes works and sometimes doesn't, and how I can make it work again? I'm using PS CS5 in Windows 7. Thanks!

    Just put this code on a file and put that 'namedfile.jsx' inside the scripts folder on photoshop.
    Open or re-open photoshop to load the script and create an action linked to a shortcut selected by you and save this script going to File>Scripts>namedfile.jsx
    It is just to press the shortcut key and the active image go back to the image opened before.
    When it is the first one it runs the script the same but it remains there.
    Here is the script:
    // Go back to the previous opened image
    #target photoshop
    // Go back to the previous opened image (not the previous viewed) . If it is the first, it remain there.
    if(documents.length>0) {
        var thisIndexImage = getActiveDocumentIndex();
        var theDocs = app.documents;
        if ( thisIndexImage != 0 ) {
            var flatAnterior = theDocs[thisIndexImage - 1];
            } else {
            var flatAnterior = theDocs[0];
        app.activeDocument = flatAnterior;
    } else {
        alert ("You must have opened images to run this script.")
    // Get the active document number - the number of opening order
    function getActiveDocumentIndex(){
         var ref = new ActionReference();
         ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         return desc = executeActionGet(ref).getInteger(stringIDToTypeID('itemIndex'))-1;
    If you want to go directly to the first of all the images (in opening order) it is simpler:
    Just create this script:
    var first = app.documents[0];
    app.activeDocument = flatAnterior;

  • Dynamic data on  Screen -Display data Based On the First Field

    hello Helping Minds..
    I have Two Fields In MODULEPOOL SCREEN.
    1--- BUKRS
    2--- BELNR ..... Both From BKPF table.
    My requirement is When i select a CompanyCode ( BUKRS ) In d first field,all the DocumentNO ( BELNR ) related to that CompCOde Shd be displayed in the 2nd field,
    For Ex-
    If i choose BUKRS = 1000,
    and Then clicked the Belnr field, All d DocumentNO for BUKRS 1000 will be populated in d Dropdown list..
            BUKRS = 0001,
    then BELNR = 0100000000 ,
                          0100000001 in d dopdown. 
    source code will be Appreciated...
    Thnks in advance To D helping Minds

    Process on value-request.
    filed Bukrs module f4_bukrs.
    field belnr module f4_belnr.
    *module f4bukrs input.*_
    if belnr is not initial.
    select belnr bukrs from bkpf whre belnr = belnr.   
    else.
    select belnr bukrs from bkpf whre belnr = belnr.
    endif.               ""   Hey both these Condition lead to same thing...den Whts d use??
    Firstly Belnr will be always Intial. cos it will be populated after we select the BUKRS.  , Here am confused?
    if t_bkpf is not initial.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'        "  No idea Abt dis FUncn module, pls explain
    endif.
    end module.
    module f4_belnr input.
    if bukrs is not initial.
    select belnr bukrs from bkpf where bukrs = bukrs.
    else.
    select belnr bukrs from bkpf whre belnr = belnr.
    endif.
    if t_bkpf is not initial.          ""   What is t_bkpf and y its used
    call fm to CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    endif.
    end module.

  • DYnamic Screen -Display data Based On the First Field

    hello Helping Minds..
    I have Two Fields In  MODULEPOOL SCREEN.
    1--- BUKRS
    2--- BELNR     ..... Both From BKPF table.
    My requirement is When i select a CompanyCode ( BUKRS )  In d first field,all the DocumentNO ( BELNR ) related to that CompCOde Shd be displayed in the 2nd field,
    For Ex- If i choose BUKRS = 1000,
                and Then clicked the Belnr field, All d DocumentNO for BUKRS 1000 will be populated in d Dropdown list..
            BUKRS = 1000,
    then  BELNR = 0100000000 ,
                           0100000001   in d dopdown.
    <<don't cross post/Duplicate else thread will be locked or deleted>>
    Thnks in advance To D helping Minds
    Edited by: Vijay Babu Dudla on Apr 25, 2009 4:57 AM

    Process on value-request.
    filed Bukrs module f4_bukrs.
    field belnr module f4_belnr.
    *module f4bukrs input.*_
    if belnr is not initial.
    select belnr bukrs from bkpf whre belnr = belnr.   
    else.
    select belnr bukrs from bkpf whre belnr = belnr.
    endif.               ""   Hey both these Condition lead to same thing...den Whts d use??
    Firstly Belnr will be always Intial. cos it will be populated after we select the BUKRS.  , Here am confused?
    if t_bkpf is not initial.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'        "  No idea Abt dis FUncn module, pls explain
    endif.
    end module.
    module f4_belnr input.
    if bukrs is not initial.
    select belnr bukrs from bkpf where bukrs = bukrs.
    else.
    select belnr bukrs from bkpf whre belnr = belnr.
    endif.
    if t_bkpf is not initial.          ""   What is t_bkpf and y its used
    call fm to CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    endif.
    end module.

  • How do I print just 1 web page in FF 29 ? With 29 you can only change the first field ( 1 of 5, 2 of 5, 3 of 5, etc. ) That means I can only print all 5 pages,

    So I cant seem to print just the 1st of 5 pages. The default setting , 1 of 5, will print all 5 pages. The 2nd field can not be altered, as it could in previous FF versions, to 1 of 1. Therefore, I can only print all 5 pages, 2 through 5, 3 through 5, etc. WTF - I keep wasting print paper. I got the print edit add-on but that doesn't seem to help. I have been through several FF versions and do not like the format of 29.

    Actually, with the [https://addons.mozilla.org/en-US/firefox/addon/print-edit/ Print Edit addon], if I click the down arrow I get the old print format options and can do it.

  • How can I get Numbers to return the first row in a group of VLOOKUP query results instead of last one?

    I'm trying to query from one table (call it Table1) a batch of rows in another table (Table2) using VLOOKUP on a date specified in the first table (Table1). My problem is it's returning the last incident in Table2 of the requested date instead of the first incident. This really breaks the OFFSET scheme I'd like to use to collect the rest of the items for that date. Is there some way to compel VLOOKUP to return the first row of query results, not the last?
    NOTE: I see I've asked this before, but forgot to go back and look at responses given. It's been a while and I've limped along until now with the way things were. I'm actually trying to delete this questions, so if you see it, ignore it. I suppose if someone can tell me real quick how to delete a stupid question, that might be helpful.

    you cannot delete a post yourself.  You can flag the post an request a moderator remove.

  • Greying out the particular field of active group

    hi guru's
    we have requirement of greying out a particular field of active screen group
    say for eg:
    LOOP AT SCREEN.
        if screen-group1 EQ 'PUR' OR screen-group1 EQ 'SAL' OR screen-group1 EQ 'FIN'.
          screen-input = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN OUTPUT.
      if rb_md EQ 'X'.
        LOOP AT SCREEN.
          if screen-group1 EQ 'PUR' OR screen-group1 EQ 'SAL' OR screen-group1 EQ 'FIN'.
            screen-input = 0.
          ELSEIF screen-group1 EQ 'MAS'.
            screen-input = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF rb_td EQ 'X'.
        LOOP AT SCREEN.
          If screen-group1 EQ 'MAS'.
            screen-input = 0.
          Endif.
          MODIFY SCREEN.
        ENDLOOP.
        if rb_pur EQ 'X'.
          LOOP AT SCREEN.
            if screen-group1 EQ 'SAL' OR screen-group1 EQ 'FIN'.
              screen-input = 0.
            ELSEIF screen-group1 EQ 'PUR'.
              screen-input = 1.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEif rb_sal EQ 'X'.
          LOOP AT SCREEN.
            if screen-group1 EQ 'PUR' OR screen-group1 EQ 'FIN'.
              screen-input = 0.
            ELSEIF screen-group1 EQ 'SAL'.
              screen-input = 1.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ELSEif rb_fin EQ 'X'.
          LOOP AT SCREEN.
            if screen-group1 EQ 'SAL' OR screen-group1 EQ 'PUR'.
              screen-input = 0.
            ELSEIF screen-group1 EQ 'FIN'.
              screen-input = 1.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        ENDIF.
      ENDIF.
    in the above code
    say for eg: the active group is 'SAL' in which i want to grey out one field say as parameter p_doc as invisible always
    what i need to do
    with regards
    s.janagar

    hi
    may be this code can help you:
    selection-screen begin of block b1 with frame title text-001.
    parameters : p1  radiobutton group r1 default 'X' user-command ac,
                         p2  radiobutton group r1,
    selection-screen end of block b1 .
    selection-screen begin of block b2 with frame title text-002.
    select-options : p_eg for mara-matnr modif id SAL
    parameters : p_doc  like mara-matnr modif id PUR.
    selection-screen end of block b2.
    at selection-screen output.
      if p1 = 'X'.
        loop at screen.
          if screen-group1    = 'SAL'.
            screen-input     = '0'.
            screen-invisible = '1'.
            modify screen.
          endif.
        endloop.
      elseif p2 = 'X'.
        loop at screen.
          if screen-group1    = 'PUR.
            screen-input     = '0'.
            screen-invisible = '1'.
            modify screen.
          endif.
        endloop.
      endif.

Maybe you are looking for

  • Is there a way to display the file location in iTunes?

    I have several external hard drives connected to my windows PC.   Over time, I have copied my music files (some I have ripped from CD's, and some I have copied from a friend's external drive) to 3 or 4 different locations, each of which is on a separ

  • Cisco Valet Connector refuses to be detected by windows

    I have bought Three of these products and all three do the same thing. I plug it in, run the setup and the setup never finishes, I can leave it up for hours and it refuses to do ANYTHING. I have talked with Live Chat and have downloaded the drivers,

  • Web Logic server 10.3.5 not running

    I am starting the WLS from START-->All Programs-->Oracle Classic Instance - asinst_1-->Start Web Logic Admin Server. When it starts it is giving error highlighted in bold.After Logging in the error in bold keeps coming.I am unable to understand this

  • Customer deletion

    HI I would like to know how to manage deletion of customer or material. I would like to report only on active customer/material. i saw that in the extraction flow there is a field deletion but i made a test with a customer in R/3 i delete it with tra

  • Format Interrupted and now PC doesn't recognize it.

    I was formatting my Shuffle and pulled it out of the USB port too soon, and now the computer won't recognize it. Yes, it was a stupid thing to do. The reset utility won't work because the PC won't recognize it. I've connected to every USB port and st