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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date calculation 1

Status
Not open for further replies.

mamarockstar

Technical User
Aug 24, 2005
18
US
Hi,

I'm using CR8 and need to calculate a date. Workers are supposed to update their client's info once a year. I can show the last date it was updated {dxdate} and I need the formula saying "if the {dxdate} is > the {dxdate} + 365 days then they are out of compliance".

Thanks for your help,
Dennielle
 
if {dxdate} < currentdate - 365 then
"out of compliance"

-LB
 
That formula worked, but I've run into a new problem. The {dxdate} field is a historical field. Some people may only have 1 entry and others may have 15. I use the following formula to suppress all dates but the most recent:

not({diagnosis_history.diagnosis_date}=maximum({diagnosis_history.diagnosis_date}))

Problem - when I use the formula LB posted in the column next to the date field, "OUT OF COMPLIANCE" shows up everytime because it is evaluating all the dates in the field - not just the current or most recent date.

I'm sorry if this is confusing...I really appreciate your help!

Thanks
 
Your suppression formula would only evaluate for the report as a whole, since you have no group condition in it. Insert a group on {table.clientID} and then instead of suppression, go to report->selection formula->GROUP and enter:

{diagnosis_history.diagnosis_date}=maximum({diagnosis_history.diagnosis_date},{table.clientID})

Then use my earlier formula in the detail section. If you need to do calculations across client groups, you would have to use running totals, since inserted summaries would pick up values from non-group selected records.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top