Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oldest Record

Status
Not open for further replies.

sjc1956

Technical User
Jan 14, 2004
19
This is a question that I'm sure has been asked a lot, but I'm having trouble with this.
From a medical record I need the oldest entry date out of multiple entry dates. I select from

{c_str_m_parm.entered_at}

I appreciate the help.
 
I did try that and get "A Boolean is required here" error.
Here's the statement with your suggestion added. I don't know if this helps or not.

{c_str_m_parm.emtek_id} = {?Pm-r_adt_core.emtek_id} and
IsNull ({c_str_m_parm.changed_date}) and
{c_str_m_parm.object_name} like 'C_CP_INDIVNIC_PHYSRES' and
Maximum({c_str_m_parm.entered_at})
 

Is this a suppression condition as you don't have "if" statement? If it's a suppression, remove if-then.

I can't test without data but try this:

if {c_str_m_parm.emtek_id} = {?Pm-r_adt_core.emtek_id}
and IsNull ({c_str_m_parm.changed_date})
and {c_str_m_parm.object_name} like 'C_CP_INDIVNIC_PHYSRES'
and [highlight]{c_str_m_parm.entered_at} = Maximum({c_str_m_parm.entered_at});[/highlight] then

 
Do you want the earliest date of a certain group, e.g., a group on {table.patient}? Then leave your original record selectionf formula as is, and go to report->selection formula->GROUP and enter:

{table.date} = minimum({table.date},{table.patient})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top