Count records based on detail row containing a null date field

i need to count the no of rows where a date field is null and print the result in each group footer. the formula isnull works well in details section  but not when I create a running total to count records where evaluate condition is based on a formula and when i test isnull(field) ?
works in detail section:
Global NumberVar numOpen;
if (IsNull({db.DateField}))
then numOpen := numOpen + 1;
does not work in group footer?
IsNull({db.DateField})

Abhilash Kumar wrote:
Well, what database are you reporting off and how did you insert a NULL value to the date column?
In my case, I have worked with Oracle, Access, and now SQL.,
and have used several different versions of Crysal (but never XI)
I/we don't put anything into the date...  the field is simply empty and I use 
IsNull({datefield})
also for numbers (&currency)
IsNull({numberfield})
For text fields I now use
IsNull({textfield}) or {textfield} not equal ""
as SQL is a little funny about the empty text fields. Sometimes one works and sometimes the other so I use both.
Debi

Similar Messages

  • To find the date type fields in the row and validate those date fields

    TYPES : BEGIN OF TY_MARA,
              MATNR TYPE MARA-MATNR,
              ERSDA TYPE MARA-ERSDA,
              ERNAM TYPE MARA-ERNAM,
              LAEDA TYPE MARA-LAEDA,
              MTART TYPE MARA-MTART,
            END OF TY_MARA.
    DATA : it_mara TYPE STANDARD TABLE OF ty_mara,
          it_mara1 TYPE STANDARD TABLE OF ty_mara,
           wa_mara TYPE ty_mara.
    loop at it_mara into wa_mara.
      describe field wa_mara-ersda type c_data.
    if c_data eq 'D'.
      CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
        EXPORTING
          date                            = wa_mara-ersda
       EXCEPTIONS
         PLAUSIBILITY_CHECK_FAILED       = 1
         OTHERS                          = 2
      IF sy-subrc eq 0.
    wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
        else.
            wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
      ENDIF.
      endif.
      endloop.
    This issue regarding how to find the date type fields in the row and validate those date fields.If its not a valid date ,i have to assign initial value to that.
    I've tried that for single field using describe field.Please help me do that for all fields.

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to show a text field based on what is entered in a date field

    Hi there LiveCycle experts!
    I have a form with a text field that I want to show only if the value of the previous date field once entered is less than 1 month from today?
    Any help appreciated, been researching in vain for hours!!!
    Sarah

    Wow Steve - thanks so much this is so exciting I just love learning these new scripts.
    I assume I need to make the text field 'Hidden' - ?
    I seem to be struggling a little to get it working - are you able to have a quick squizz at my document - it is in the very early stages!
    Regards,
    Sarah Milne
    FACEBOOK : Join our  'BritBound Social Events' Group on Facebook to receive details of forthcoming social events...click here to join. 
    For a sociable & stress free arrival experience!
    BritBound London Office: Britain & London Visitor Centre, 1 Regent Street, London, SW1Y 4XT.
    Tel UK: | 0845 450 3536 | From OS + 44 (0) 20 7808 3815
    Tel OZ: | Sydney: (02) 8003 7651  | Melbourne: (03) 9005 8304 | Brisbane: (07) 3102 9766
    Tel NZ: | Auckland: (09) 889 3175 | Wellington: (04) 889 2015   | Christchurch: (03) 669 2032
    Website:        www.britbound.co.uk
    E-mail:           [email protected]
    Click Here to find out more about: | UK VISAS  | MOBILE PHONE CONTRACTS FOR NEW ARRIVALS TO THE UK  |  UK ACCOMMODATION  |  AIRPORT TRANSFERS  |  UMBRELLA COMPANIES   |  DISCOUNTED INTERNATIONAL BANK TRANSFERS  |  SOCIAL EVENTS   |  TAX REFUNDS  |  NATIONAL INSURANCE (NI) NUMBERS
    Disclaimer: The information contained in or attached to this message is intended only for the people it is addressed to. If you are not the intended recipient, any use, disclosure or copying of this information is unauthorised and prohibited. This information may be confidential or subject to legal privilege. BritBound cannot accept liability for any virus damage caused by this message. This documentation is for your general information, and is not to be construed as advice. Clients should not act on the information contained herein alone, and should seek independent advice if necessary.

  • Show text in the column other than contains in actual data field WD ALV

    Hi,
    I want to show the data in the ALV column other than contains in the actual field for this column. Fot this purpose I use method   SET_TEXT_FIELDNAME of the interface IF_SALV_WD_COLUMN_REF. Unfortunately, I still see the contents of the actual field in this column. What am I doing wrong?
    Here is the snippet:
    lr_column_ref type ref to  cl_salv_wd_column,
    lr_column_ref_ref type ref to if_salv_wd_column_ref
    lr_column_ref = lr_column_settings->get_column( id =  'FIELD1' ). "Column I want to replace with new value
    lr_column_ref_ref ?= lr_column_ref.
    lr_column_ref_ref->set_text_fieldname( value = 'FIELD2'). "New value column
    Thank you

    Hi Mayank,
    Its easy. Once you obtain the reference of your desired column create an instance of the & then set it to the cell editor. Check the code fragment below:
    data: lr_caption        TYPE REF TO cl_salv_wd_uie_caption.
      LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'CHECK'.
             CREATE OBJECT lr_caption.
             lr_caption->set_image_source( value = '~Pictogram/3People' ).
             lr_caption->SET_TEXT( value = 'My Text!' ).
            <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    In the snippet above am changing the cell editors of column by name CHECK to contain a pictogram by name "People" & a static text "My Text". So now all my cells under the CHECK column would contain both the pictogram & the text.
    Regards,
    Uday

  • Count records based on 3 columns

    I am using oracle 9i. Actually i need to count the resources based on three columns like Workgroup, month and task.
    Totally six columns in a table like tasktype, resource, workgroup, Workdate, Task, Month. Records and outputs are given below.
    Example:
    tasktype, resource, workgroup, Workdate, Task, Month,
    R, Abhishek, MC Consultant, 1/8/09 12:00AM, Non-Billable, 1
    R, Abhishek, MC Consultant, 1/9/09 12:00AM, Non-Billable, 1
    R, Abhishek, MC Consultant, 1/26/09 12:00AM, Non-Billable, 1
    R, Abhishek, MC Consultant, 2/2/09 12:00AM, Billable, 2
    R, Abhishek, MC Consultant, 2/3/09 12:00AM, Billable, 2
    R, Aboo, MC Consultant, 1/5/09 12:00AM, Billable, 1
    R, Aboo, MC Consultant, 1/6/09 12:00AM, Billable, 1
    R, Badri, MC Consultant, 2/20/09 12:00AM, Billable, 2
    R, Badri, MC Consultant, 2/21/09 12:00AM, Non-Billable, 2
    R, Betsy, Contractor, 1/2/09 12:00AM, Billable, 1
    R, Betsy, Contractor, 1/5/09 12:00AM, Billable, 1
    R, Bhavani, Contractor, 1/5/09 12:00AM, Billable, 1
    R, Brian, Contractor, 2/17/09 12:00AM, Billable, 2
    output:
    Task, Month, Workgroup, count
    Billable, 1, MC Consultant, 1
    Non-Billable, 1, MC Consultant, 1
    Billable, 2, MC Consultant, 2
    Non-Billable, 2, MC Consultant, 1
    Billable, 1, Contractor, 2
    Non-Billable, 1, Contractor, 0
    Billable, 2, Contractor, 1
    Non-Billable, 2, Contractor, 0
    Thanks in advance

    Please avoid posting your homework here.
    Definitely DON'T post it in multiple forums, acting extreemly rude.
    Sybrand Bakker
    Senior Oracle DBA

  • Counting Records based on Time

    Hi,
    This is my Records
    Date Rolls
    09-oct-12 08:00:00 10
    09-oct-12 08:00:50 20
    10-oct-12 07:00:00 5
    10-oct-12 10:00:00 10
    Morning 8 to next morning 8 o'lcock to be taken as single day.
    Output:
    09-oct-12 35 (10+20+5)
    10-oct-12 10
    Pl. help How to achieve this.
    Thanks
    Kavi

    When you wish a "skewed offset" definition of a day, you can subtract the required number of hours and then trunc to whole days.
    Like this:
    SQL> with data as (
      2     select to_date('09-10-2012 08:00:00','DD-MM-YYYY HH24:MI:SS') thedate, 10 rolls from dual union all
      3     select to_date('09-10-2012 08:00:50','DD-MM-YYYY HH24:MI:SS') thedate, 20 rolls from dual union all
      4     select to_date('10-10-2012 07:00:00','DD-MM-YYYY HH24:MI:SS') thedate,  5 rolls from dual union all
      5     select to_date('10-10-2012 10:00:00','DD-MM-YYYY HH24:MI:SS') thedate, 10 rolls from dual
      6  )
      7  select to_char( trunc(data.thedate - interval '8' hour)
      8                , 'DD-MM-YYYY HH24:MI:SS' ) theday
      9       , sum(rolls) rolls
    10    from data
    11   group by trunc(data.thedate - interval '8' hour)
    12   order by theday
    13  /
    THEDAY                   ROLLS
    09-10-2012 00:00:00         35
    10-10-2012 00:00:00         10

  • Insert record in master detail relationship

    Hi,
    I have the following situation. I have two tables (master and detail in 1:1 relationship). What I want to do is to skip through the master table and insert a record into the detail table containing only the id of the master table (foreign key column in detail table).
    My tables look like this:
    Master:
    ID
    NAME
    ADRESS
    Detail:
    ID
    DETAILS
    MASTERID (foreign key)
    For I am not experienced in PL/SQL does anybody give me an idea on how to do this. I think it is suitable to have a procedure solving this...
    Thanks in advance!
    Tino

    Here you go:
    CREATE TABLE dt_test_master
    (     id           number primary key,
         descr      varchar2(10)
    INSERT INTO dt_test_master VALUES(1, 'Master 1')
    INSERT INTO dt_test_master VALUES(2, 'Master 2')
    CREATE TABLE dt_test_child(id number, master_id number, col1 varchar2(10))
    alter table dt_test_child add constraint dt_test_child_fk_master
    foreign key(master_id) references dt_test_master
    CREATE SEQUENCE dt_test_child_id_seq
    CREATE OR REPLACE PROCEDURE p_CreateChild(     an_MasterId dt_test_child.master_id%TYPE,
    av_Col1          dt_test_child.col1%TYPE
    IS
    BEGIN
         INSERT
         INTO
              dt_test_child
              (     id,
                   master_id,
                   col1
         VALUES
              (     dt_test_child_id_seq.NEXTVAL,
                   an_MasterId,
                   av_Col1
    END;
    SQL> exec p_CreateChild(1,'Child1');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(1,'Child2');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(2,'Child1');
    PL/SQL procedure successfully completed.
    SQL> exec p_CreateChild(3,'Child1');
    BEGIN p_CreateChild(3,'Child1'); END;
    ERROR at line 1:
    ORA-02291: integrity constraint (TYLERD.DT_TEST_CHILD_FK_MASTER) violated - parent key not found
    ORA-06512: at "TYLERD.P_CREATECHILD", line 8
    ORA-06512: at line 1HTH
    David

  • How to count records in a page which are in detail section

    Hi
    Is there a option to count records in detail section and so that based on that can apply a formula.

    Hi
    can i place the below two formulas in section experpt ?
    my report is like
    gh#1 
    details-----which contains transactions related to above group for a country
    group footer#1contains line '--
    if for india there are 3 records in the same page there can be 2 or 3 records in detail section. like that a page can contain more than one country. if number of records are more and coming in next page then the whole section should be moved to new page.
    that is my req. can u suggest accordingly.....
    i want to count the number of records in detais which will vary also how can i put formula when they are going to next page?

  • How to find count of records based on batch wise.

    Hi All,
    We are working on OWB10gr2. I would like share one requirement. Any one can suggest me how to do it and which is the best way to get accurate information.
    We have 2 schemas’ like nia_src and nia_tgt. currently we are moving data from nia_src to nia_tgt for that reason we implemented some mappings based on requirement. In my source schema (nia_src) having 100 tables with data and similar structure replicated in target schema (nia_tgt).
    In source schema every table having one date field for which record is inserted and based on that field we can find how may records are inserted on particular table ,particular time.
    Same like target also maintaining date fields for tracking purposes.
    We have done some mappings and scheduled also. Every day we are into the target with incremental data. All are working fine not any issues.
    I wanted to know how many records inserted, updated, merged for particular batch
    How can we find?
    Can we find exact information in OWB_REP_OWNER schema on WB_RT_AUDIT?.
    For tracking purposes I need to find those values how many records are available in
    Source table and how many records are populated to the target schema?
    How to find schedule batch count of records table wise for batch wise?
    Please suggest me any one on this.
    thanks and regards,
    venkat.

    RE: based on pre operator can we find count of records. if yes how to do it.
    No, you cannot tell from the pre- operator how many records will be inserted or updated into a mapping. How could you? The mapping hasn't run yet!
    At best (if you have simple mappings with single targets) you could come up with a strategy to have the pre-mapping procedure aware of it's package name, then select from user_source for that package body until you find that first cursor used for the row-based processing, copy the cursor into a local variable, and then execute immediate select count(*) from that cursor definition. But still, all that would get you is the number of rows selected - not inserted / updated / errored etc.
    A post-mapping procedure that is aware of the package name will, however, run prior to package exit so that the package spec is still in memory so you can access the public variables in the package spec. We do that in our standard post-mapping procedure
    CREATE OR REPLACE procedure erscntrl_finalize_prc(
                           p_process_id     in  number,
                           p_process_name   in  varchar2)
    as
          l_numread      number         := 0;
          l_numInserted  number         := 0;
          l_numUpdated   number         := 0;
          l_numMerged    number         := 0;
          l_owb_audit_id number         := 0;
          l_owb_status   number         := 0;
          sqlStmt        varchar2(2000) :=
                               'begin '||
                               '  :1 := '||p_process_name||'.get_selected; '||
                               '  :2 := '||p_process_name||'.get_inserted; '||
                               '  :3 := '||p_process_name||'.get_updated; '||
                               '  :4 := '||p_process_name||'.get_merged; '||
                               '  :5 := '||p_process_name||'.get_audit_id; '||
                               '  :6 := '||p_process_name||'.get_status; '||
                               ' end;';
    begin
          -- we use dynamic SQL to return required audit field values.
          --  This allows us to alter which values we need at a later date
          --  without impacting the deployed mappings.
        execute immediate sqlStmt
        using   out l_numread,   out l_numInserted,  out l_numUpdated,
                out l_numMerged, out l_owb_audit_id, out l_owb_status;
      -- then execute our own logging package.
       owb_mapping_log_pkg.finalize(
                           p_process_id,
                           p_process_name,
                           l_numread,
                           l_numInserted,
                           l_numUpdated,
                           l_numMerged,
                           l_owb_audit_id,
                           l_owb_status
    end;
    /However, even in this case bear in mind that if you run the mapping in set-base mode, all Oracle returns is the number merged which does not give values for the inserted and updated counts. If you really need those values you need to either a) run in row-based mode or row-based-target-only, or come up with some custom queries. For example, in your pre-mapping do a select count(*) from your_target_table, then run the mapping, then get the number merged, then do another select count(*) from your_target_table. With these values and basic math you could tell the number inserted by the growth in the table, and the rest of the number merged must have been updates.
    That being said, if you are playing with dimensions as large as most of the ones I am - there is no bloody way that you want to do two select count(*) statements on each run without a really, really good reason.....
    Cheers,
    Mike

  • Counting the number of detail records at target side...

    Hi
    I have a requirement where i need to caluclate the number of detail records formed and add it in trailer section...both at target side...
    The output will look like this :
    <Detail>
        <Field></Field>
    </Detail>  
    <Detail>
        <Field></Field>
    </Detail>
    <Detail>
        <Field></Field>
    </Detail>
    <Trailer>
       <Count> 3 </Count>
    </Trailer>
    Basically, In trailer the Count field will contain the number of Detail records.
    Can this be achived by a UDF?? Please help!!!

    Actually teh detail node formation at target depends on a lot of nodes of source side...using Count I have already done it but due to lot of nodes @ source side it becomes kind of a mesh...
    Hence I was trying to figure out a way in which if I can count the number of detail nodes at target side I can remove the present mapping...
    Corect me if I am wrong but can't we declare this target detail node as global variable and then use 'Count' function to capture its occurence???
    P.S : In XI 3.0 we used to have a tab to declare global variables but here in 7.1 we have Functions tab...could anybody tell me how to declare the variable in 7.1?

  • Best way to create detail records based on data in the master record..

    Hi,
    I am using 11gr1p1 and ADF stack.
    I have a master detail relation between 2 records. I have EO and entity associations. I want to create a number detail records based on the data on the master record.
    For example
    I have a Stay Record which has begin and end date I need to create the DailyStay Record for each day for the range of begin and end date of StayRecord.
    Where should I do this? In EO implementation or in VO implementation.?
    Thanks

    Where should I do this? In EO implementation or in VO implementation.?If your child record should in no case be created without those default values, then EO.
    Otherwise, to increase reusability of your EO, then in the VO over the view link (i.e. other VO's would still be able to use your EO without having the child VO created with these defaults).
    This way your ViewObjects can also be used in a context where you don't want to copy from the masterFrank, If there's another UI flow that is so drastically different that it does not want things defaulted, then it probably needs a different VO altogether (on the same underlying EO though)

  • Duplicate a detail row to any position of a detail block

    Hi,
    The default performance of duplicate_record built-in is to copy the current detail row to the next created detail row.
    I use this code to do this:
    create_record;
    duplicate_record;
    How can i duplicate a row to any detail position of the detail block ?

    As usual, you can accomplish this task in one or more ways.
    Generally, I advise against using globals.
    Basically, you need to store the content of a record temporarily into a dummy record or other type of collection based upon the current record structure.
    The easiest, albeit the least reusable method, would be to create a dummy block with the same structure as the block containing the record you wish to duplicate.
    Using buttons, pop-up menus, etc, copy the desired record from the source table to the dummy table and back. This target record need not be a new record depending upon your requirements. In any case, be aware of unique value and other constraints.
    A more flexible solution would be to create a procedure, based upon a pl/sql table or other collection type that would duplicate the record structure on-the-fly. This could be included in a library and be usable by other forms.

  • Master-Detail: create detail-row(s) with id already filled in

    I have two tables with an one-to-many relationship (connected by 'id'). If you select a row from the master-table, you'll see the detail-table (with the various row's belonging to the master-record). Now I made a button which users can use to add additional rows to the detail-table. They get a form which they can fill in and submit, the only problem is... I don't want them to manualy fill in the id, this should be the only field that should already be filled in (or better should be invisible, but filled in). So they should select a master-row first and then click 'add' to add a detail-row(s) to it. But I have absolutely no clue how I can do this... I tried creating custom create methods in the view-object or entity-object... but the problem I keep running into is where to get the row-iterator... I have know idea if this is the right direction to look for, maybe somebody can give me some advice.
    Thanks in advance...!

    Steven, hope you can help me out once more...
    I have the same problem with a different view object, I'll explain...
    First of all I set jbo.locking.mode to 'optimistic', now the problem...
    I have two entity objects (Mbrships and Mbrshiphistory) which are connected by a foreign key (created in the database) on MbrshipID. Mbrshipshistory is also connected to the Aff entity object by a foreign key on AffID. The idea is simple... there are affiliates and a couple of memberships. An affiliate has/had a membership, that's where the membershiphistory-table comes in, which stores AffID, MbrshipID, DateFrom, DateTo and some other values.
    Now, what I created... JDeveloper created entity-objects of all the tables and made associations of the foreign keys. I created the following view objects: http://213.93.142.238/oracle/datamodel.jpg and application module: http://213.93.142.238/oracle/applicationmodule.jpg The (MemberToMembershipHistory) view link between Members and MembershipHostory is based upon the association between the two tables.
    The following is a screenshot of my struts-config.xml: http://213.93.142.238/oracle/struts-config.jpg
    Editing mbrshiphistories works fine, but I get the following error when I try to add one: oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity. I also don't see the AffID already filled in in the add/edit-screen (same problem as in the opening-post) when I try to add one. I double-checked everything, but I can't find the problem. Do you know what I do wrong...?

  • Interactive Reporting - Counting Records in a Non-numeric Column

    I have created a report that shows open trouble tickets, the group they are assigned to and the status of the ticket. I would like to create another report based on the first one that shows each group and the number of tickets they have in each status category. For example:
    Group Assigned Testing Closed Total
    Bus. Analysts 2 5 0 7
    I.T. 6 2 3 11
    Is there a function in IR that can count number of rows/records?

    depending on how you have your data you can use a Pivot section.
    If the data is 1 row = 1 record then add computed column to your results with a static value of 1 and use that as your fact within the pivot with your Ticket Type as a top label and group as a side label.
    Wayne Van Sluys
    TopDown Consulting

  • Creating a master automatically when creating a detail row

    Hi,
    I'm using Jdev. 11.1.2.3.0
    I have three tables (with their corresponding view objects) with a master/detail/detail relationship.
    The first-level detail table contain a maximum of one row for each master row.
    The ids of the first-level and second-level details are automatically generated with a groovy expression and a sequence.
    The views are added on the page as table(master/)form(detail)/table(detail).
    I have a case where a master record has no details and i need to create a row in the second-level detail table.
    So is there a way to tell ADF to automatically create the first-level detail row (since the master is known) ? or i should manually check that such a row doesn't exists in the first-level detail table and thus create it before creating the row in the second-level detail table?
    Thank you.

    So is there a way to tell ADF to automatically create the first-level detail row (since the master is known) ? or i should manually check that such a row doesn't exists in the first-level detail table and thus create it before creating the row in the second-level detail table?
    Thank you.
    No, there is no such option so you will need to manually create this row.
    Dario

Maybe you are looking for

  • IPod 30 GB not recognized by new MacBook Pro

    I have a 30 GB iPod (bought it in December 2006) and used to use it with my Powerbook G4. I upgraded the G4 with Tiger (originally it had jaguar) so I could download iTunes 7 so my new iPod would work with my old G4. Everything worked fine. Now I hav

  • Time Capsule dual wireless routers issues

    I have a TimeWarner cable modem in the closet with a net gear 8port router connected where are all my cat5 cables drop in for our home. I have a Cisco wireless router in the living room running wifi to iPads, iPhones, etc. That router has a cat5 cabl

  • Need to run fsck on UCS Central VM -- how?

    We had a storage disruption event recently that appears to have flipped the root volume on our UCS Central VM to read-only. After rebooting the VM, I get an error message about needing to run a manual fsck due to filesystem errors on /dev/VolGroup00/

  • Help with starter page

    I'm using DW8 and I created a starter page and modified it very little except to add a flash movie on the left hand side. I've uploaded ALL of the files to my site and it works fine except it DOESN'T show the Flash movie. It doesn't show a spacer for

  • RoboHelp 9 - Self-authoring Features?

    I've developed a number of online Help solutions for a company-internal audience and there have been a few requests to create a more Wiki-like interface/experience where the user base or audience may be able to self-author some of the content (or in