How do I select the row with the most recent date/time?

We have a medication report that needs the last administration time displayed. Can anyone help with a selection formula that chooses the max date?

The easiest thing to do is sort by the date (descending), and show the first record, suppressing all others until the next medication, patient, or whatever your grouping is.  This is done with a global variable:  Set it to FALSE at the beginning of the group(s), suppress the detail line based on the value of the variable, and then set it to TRUE (which can also be done in the Suppress Format formula).
HTH,
Carl

Similar Messages

  • How to select the most recent date in a CR XI subreport

    Post Author: rickcf
    CA Forum: General
    I have a sub report and it is simply a reporting of a sub table.  It is a table that has multiple records with many dates coupled with types.  I only want the most current date for certain types - the types can have more than one date.  Much like the following select statement
    select type, max(date) from table where type <> 'E' group by type.
    How can I accomplish this in crystal? 
    Thanks

    Post Author: Jagan
    CA Forum: General
    Group on type. Use record selection formula for type <> E, use group selection formula for the max date. e.g. group formula is{table.date} = maximum({table.date, table.type})

  • How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?

    How do I get the numbers ipad app to plot a graph of dates against values, where the most recent date is on the right of the graph, but the most recent date is at the top rather than bottom of the rows in the table?
    Also how can it be a line graph without plotting a circle at each value?
    Thanks this is very frustrating

    Make a copy of the table and produce your Line chart or Bar chart from the copy. Sort the copy into the order you want to see in your chart.
    Alternately you could use a Scatter Chart...
    Jerry

  • In Messages, how can I get the most recent entries to appear on top, like with my emails?  Thanks!

    In Messages, how can I get the most recent entries to appear on top, like with my emails?  Thanks!

    HI,
    A Note.
    Technically the most recent Conversation (or Chat) that has a new message (be it iMessage or IM) will move to the top in the list on the left if it is set in the View  Menu to do so.
    Obviously this does need more than one Conversation or Chat to be listed to work.
    It does not change the focus of the Chat/Conversation you are viewing.
    iChat - the forerunner naver had an option to invert the chats.
    The iChat Feedback page is where I use.
    You will also see it does not list iChat 6 depsite listing Lion.
    In this sense it has always beeen out of step on the iChat/Messages version front  (it took me a long time via the Lounge and Host help to get it on the list of pages to be updated on New OS versions)
    11:00 PM      Friday; June 28, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Highlighting the most recent date in a row

    hi all
    I have a series of 5 dates in a row. I would like to be able to highlight only the cell containing the most recent date (in respect to the current date) in each row.
    There will be instances when there is no date in some of the cells.
    Thanks for the help in the past, this and the other forums are awesome.

    Jason is correct. It requires two tables.
    I had started experimenting with this last night, but an outage at my ISP prevented posting at that time.
    Conditional formatting of a cell depends on comparing the value in that cell with a fixed value contained in the rule; the rule itself cannot reference a different cell to pick up the comparison value. So you need to calculate a value in a cell on a second table, apply conditional formatting to that cell, and place it directly behind the cell containing the date to be highlighted.
    Example:
    Dates are in cells B7 to F7 of Table 1
    Cell H1 is used to select the maximum date.
    Table 2 is a single row table with no row or column header cells, and only 5 columns.
    Select Table 1, open the Inspector, and use the Table inspector to set Cell Background to “None”
    In Cell H1 enter: =MAX(B7:F7)
    Go Insert > Table > Plain
    Resize the new table (Table 2) to 1 row x 5 columns.
    In A1 of Table 2, enter: =DATEDIF(Table 1::B7,Table 1::$H7,"D")
    Drag the handle at the lower right of the cell to copy the formula into all five cells.
    Click on A1.
    Open the Inspector and choose the Cell Format inspector.
    Check the Conditional Format checkbox, then click Show rules...
    Set the rule to “Equal to... 0”
    Choose a Fill colour to serve as your highlight colour.
    Click on the next cell and repeat.
    When you have applied the rule to all five cells, close the Conditional Format dialogue.
    Choose all five cells. Open the Text inspector.
    Click on the colour well.
    Leave the text colour set at Black, but move the Opacity slider to 0%.
    Close the Inspector and the Colors dialogue.
    Select Table 2 and drag it into position covering the five cells with dates on Table 1. Use the Arrow keys to nudge it into exact alignment.
    Go Arrange > Send Backward to move Table 2 behind Table 1. Repeat until you can see the dates on Table 1.
    Regards,
    Barry

  • Clicking the Stamp tool doesn't select the most recently used stamp - Acrobat X

    My issue is pretty much what the title says. Clicking the Stamp tool doesn't select the most recently used stamp. According to the Help screens and training videos, it should. I've checked Edit > Prefernces and could not find a setting that adjusted this behavior of the Stamp tool. Does anyone know what can be done to fix this? BTW - It's not just my installation of Acrobat X. Other users at my firm are having the same issue. The OS is Windows 7. Users have administrator rights. Thanks in advance.

    Hello Abhilasha,
    So, what your saying is that this function, the ability to select the most recently used stamp by clicking the stamp tool, has been removed, in spite of the fact that Acrobat's Help pages says it can be done (Using Acrobat X Standard > Collaboration > Commenting > Apply a Stamp > Step 1 > Second bullet). I wish they would put it back. It was quite handy.
    Perhaps I should adjust my request. Do you (or anyone else) know of a way to use the same stamp several times in a row without having to choose the stamp from the stamps list? For example, if you needed to put a check-mark stamp in several places in a document, it would be a pain to have to go back to the list each time. Is there perhaps an undocumented feature (maybe holding down a particular key while using the stamp) that would allow for multiple stamping?
    Thank you,
    Phillip

  • HT4623 I have ios 5.1 and according to my ipad there are no ios updates but yet there are apps I would like to use that require 6.0 or later.  how do i get the most recent ios 7.0.3?

    how and where do I the the latest IOS for IPAD!!!

    Fredronalderman wrote:
    there are apps I would like to use that require 6.0 or later.  how do i get the most recent ios 7.0.3?
    Finding iOS Apps Compatible with Older Devices
    App Store: Downloading Older Versions of Apps

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

  • I got a new iphone 6.  When I restore my phone from my icloud backup my most recent photos and messages not restored from icloud backup.  How do I get the most recent backup onto my new phone?

    I got a new iphone 6.  When I restore my phone from my icloud backup my most recent photos and messages not restored from icloud backup.  How do I get the most recent backup onto my new phone?

    Hello, Anita.  
    Thank you for visiting Apple Support Communities.  
    I understand that you are wanting to restore your new iPhone 6 from an iPhone 5 backup.  This sounds like the iOS version of your old iPhone 5 may be newer than what was installed on your iPhone 6.  Try going through the steps in the article below.  
    iOS: Unable to restore from backup of a newer device
    I would also check to see the backup dates in iTunes and if the  backup is located on iCloud instead of iTunes.  
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes
    Cheers, 
    Jason H.  

  • How to return only the most recent row?

    Hi guys,
    I have a question which I am hoping is not too difficult but I just am not sure how to do it. I need to run a query on a table which may bring back multiple rows for my criteria, however I only want to bring back 1 of these multiple rows and the one I want to bring back has to be the most recent. I do have a date_created column on my table as well as a date_last_updated column. So basically using the select statement below as an example this query could return lets say 5 rows, I however only want it to return the most recent row and the most recent row is determined by the date_last_updated (which will only be populated if the record has been updated otherwise it is null) or the date_created fields.
    select * from my_table
    where model_id = 234
    Any help on this matter would be greatly appreciated.
    Thank you.

    Hi,
    you can do; -
    select *
    from
    (select *
    from my_table
    order by creation_date desc)
    where rownum = 1This does not guarantee that you will get the most recent in cases of records being created at exactly the same time, but if your table has a prime key then you could use this as the order by to get the same effect, though if say 5 records are inserted as a batch what does it really mean to be inserted last....
    regards,
    Robert.
    Edited by: Robert Angel on 09-Jul-2012 08:22 to add code tags.

  • In mail how do I stop messages from the same sender from showing up when I select the most recent message from a sender?

    on my iMac, when I view messages there is a grey number at the top of the message. This number denotes the amount of  messages from that sender and when I view the most recent message in my mailbox (from that sender) all of the older messages load with it and this takes a while for the message to become moarked as "read." I know that I can turn this off because I have mountain lion on my air and i do not have this issue. how can i turn it off?
    thanks

    thanks so much, that fixed it! before I posted this quiestions I kept looking in the mail preferences but I dind't think to look on the View menu.

  • When I sort by date added in Column View in Finder, how can I make the most recent files appear at the top of the list?(Mavericks)

    In 10.8, when I sorted Finder by date added or date created in column view, the most recent files would appear at the top of the list. Currently, this happens as it should in every single view mode EXCEPT column view (which is pretty much the only view I ever use). Currently, I have a folder with over 2000 files in it that date back to 2011, so now I have to scroll for like ten minutes just te get to files that were most recently added. Who in their right mind would want to sort by last modified with the oldest result listed FIRST? Ridiculous. I can't figure this out. Any help?

    Thanks for the reply leroydouglas! Unfurtunately this doesn't cause the column to be ordered correctly either. After selecting this option, the files seem to be ordered by label, and the most recently added file is somewhere in the middle of the list. I'd like it to be at the top, and have other files/folders descend in retrochronological order by their add date.
    Any other input from the community would be greatly appreciated, even if it's just confirming that this is/is not expected behavior. I'd be super bummed to find out that this IS expected behavior, as it's really counterintuitive and extremely inconvenient.
    Thanks again!

  • Select the Most Recent Record

    I have a 2-page report that is grouped by employee, where the first page is a standard letter except for address, and the second page is a reproduction of a scanned form that the employee had returned.  The employee may have returned several versions of the form over time, updating it each time.
    I would like to have the report only pull in the most recent scanned image, ignoring all prior images.  I'm struggling with the correct record selection criteria. 
    Any help would be appreciated.
    Thank you.

    Hi,
    If you have any date field in the data base that updates the time whenever the image is updated then use that date field in the report-->record sort expert and use ascending order. Now place the image field from the data base in the group footer of Employee which shows the latest image. If you want the old one then goto record sort expert and change the order for date field to descending.
    Regards,
    Raghavendra

  • ITunes is a blank-slate...How do I load the most recent previous version of my library?

    I "re-arranged" my files on my computer to free up space and now my iTunes is completely blank.  No apps, no music, no ringtones.  Nothing.  How do I find and load the most recent previous version of iTunes?  Since we went to the cloud I haven't actually plugged my phone in to sync it...I'm afraid it will ask me if I want to load what's on my phone into iTunes, and I just want my old iTunes back.  Any ideas?  TIA!

    When you re-arranged your Files for iTunes, in your C:\Users\Your Username\Music\iTunes folder ->should be a iTunes library.xml, and a Itunes library.lib- if you moved those thats why your library is blank.
    Simply go to File- Add folder to library-> locate your Music folder- click choose - and you library should come back

  • I have more songs than can fit on my ipod.  How do I add the most recent when I sync?

    I suppose sometime I will have to get a bigger IPOD, but I still love hwat I have but like to mix up the music.  I now have too many songs on my computer to load on my IPOD.  Is there any way to automatically load the most recently added tunes when I sync or do I have to manually deselect tunes I don't want to load?

    Hello sifishman,
    Instead of trying to reinvent the wheel on this one or explain it myself, have a look at this Apple support document.  Should be able to answer your question.
    How to sync music to your iPod when your library is bigger than your iPod storage space
    B-rock

Maybe you are looking for

  • Defining Key -field and data fields

    Hi all i have to define Key-Fields and data-Fields for a DSO(say DSO3). DSO1 is a combination of DSO2 and DSO3.. DSO1 and DSO2 are SAP defined DSOs. DSO3 is a User defined DSO. my assumption:    DSO3 has 30 fields    DSO2 has 16 fields.    can i crea

  • Continuously send data to applet through servlet

    Hi, I'm trying to write a servlet that, once activated, will continuously send data back to a thread in the client. My problem is that the data isn't actually sent until the stream is closed. I'm hoping someone can point me in the right direction: Se

  • Error in mail box work item not executable

    HI, i build simple WF for approve and reject  that send for user to  sap inbox some decision ,when i check the inbox of the user and double click on the line i get some red triangle in the status Colman  with error work item not executable, what can

  • Lumia 1020 double tap works it wake up phone but t...

    lumia 1020 double tap works it wake up phone but touch screen not working i don't know what happened. even i am not able to unlock my phone. touch screen is not working.

  • ME_PROCESS_PO_CUST: Method "POST"

    Hi all, I'm trying to update the 'EKPO', and I will use the BADI 'ME_PROCESS_PO_CUST'. When you click the 'SAVE' of purchase order, I want to update the 'EKPO-LGORT'. and I will try to use method 'POST'.But the method 'POST' has only 'IM_HEADER'. Now