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

Crystal Reports Formula

Status
Not open for further replies.

olu

Technical User
Apr 6, 2001
5
GB
How do i generate a crystal reports formula which would basically tell me the number of calls resolved in the last 24 hours?
 
Do you have a date/time field to tell you when each call was placed? If so use:

If currentDateTime - {yourfield} < 1
then 1
else 0



No do a grand total sum of this field. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Hi Ken, i have tried what you asked me to do... i have a field called 'Date Requested' which was basically the date the call was raised. I tried out ur formula but it seems to be giving me some errors, which i couldn't figure out. Please see below.

FORMULA:
CurrentDateTime - {sprt_Service_Request.Date/Time Requested} < 1
then 1
else 0

ERROR:
&quot;The Remaining Text does not appear to be part of the formula&quot;
 
That error message often appears when you have the wrong type of data. For example, make sure that {sprt_Service_Request.Date/Time Requested} is in the correct form (either Date or Numeric). If it is a string, you cannot subtract it.
 
right click on your date/time field and select &quot;browse field data&quot; to find out what data type it is.

Also, what exactly do you mean by 24 hours? do you mean exactly 24 hours at the time you run the report, or do you mean all of yesterday regardless of the time the report is run. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Hi Guys and thanks so much for replying to my mail....
The field is a date/time fieid.
By 24 hours, i mean the hours at the time i run the report, when the status of the call is set to resolved.
This was the formula i had before, but it wasn't calculating it correctly.

{sprt_Service_Request.Date/Time Resolved} > (CurrentDateTime - 60 * 60 * 24)

I look forward to a reply soon. Thanks

 
Try my originla formula again, this time try starting it with the word IF. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Does anyone know how to create a group using the crystal report RDC object model?
 
Post this as a NEW question in the Crystal Reports Integration forum. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top