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

Easy Average Date Question

Status
Not open for further replies.

Cherrel

Technical User
Dec 5, 2001
34
US
Hi All!

I'm very new to Crystal Reports (v.7.0) and I'm having problems with this SIMPLE formula. I'm trying to AVERAGE a field against today's date.

Field ({equipment.installdate}) and haven't been able to average with currentdate.

Can anyone help? (I'll probably be saying "DUH!" with the answer...) X-)

Thanks!
Cherrel.
 
You cannot average by a field that is not a part of your database or report details and currentdate typically would not be stored there.

I think what you want is the following: right click on the field object that you want averaged, and click insert summary. Make it an average summary, and set the group by a valid date field in your database.

Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
If you are familiar with SQL you can create views that calculates the desired operation between your date field and current date etc. so there will be need to do something on the report and It will be more effective.:p
 
What I ended up doing was this...

(currentdate - {equipment.installdate}) / Count ({matusetrans.quantity}, {item.itemnum})

And it worked perfectly! LOL
Cherrel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top