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

Formula for Date over 3 days old 1

Status
Not open for further replies.

MichyK

MIS
Jun 19, 2003
3
US
I am trying to run a report for technical calls that took more than 3 days to resolve. The formula that I am using is not working;
If {Help_Desk.Open Date} in Over3Days Then {Help_Desk.Open Date} Else 0
When I check the formula it gives me the following error "A number,currency amount,boolean or string is expected her."

Can someone please tell me what I am doing wrong. Thank you in advance.
 
There is no such function as Over3Days.

Use this instead:

If {Help_Desk.Open Date} < DateAdd('d',-3,CurrentDate) Then {Help_Desk.Open Date} Else 0

Naith
 
How are you creating this formula? Is this a record selection formula?

If so the formula result must be a boolean -- it must evaluate to either true or false. Your formula does not do this.

If this is a formula that you created by insert, field object, formula field, you cannot mix data types of the then and else arguments. In your formula the then value is a date, and the else value is a number. Try maing the else value date(0,0,0).



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
How are you creating this formula? Is this a record selection formula?

If so the formula result must be a boolean -- it must evaluate to either true or false. Your formula does not do this.

If this is a formula that you created by insert, field object, formula field, you cannot mix data types of the then and else arguments. In your formula the then value is a date, and the else value is a number. Try making the else value date(0,0,0).



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
To limit the rows use:

Report->Edit Selection Formula->Record:

{Help_Desk.Open Date} < CurrentDate-3

This will limit the rows returned to those older than 3 days.

-k
 
I'm guessing that you also have a field {Help_Desk.Close_Date}. Since you haven't specified that you are only looking at technical calls that have not yet been resolved, I'm assuming you want to report on all calls where the resolution took more than three days. If you have the closed date field, you could create two formulas. Use this one to substitute for the closed date {@closeddate}:

if isnull({help_desk.close_date}) or {help_desk.close_date} = date(0,0,0) then currentdate else {help_desk.close_date}

Then create a formula {@resolution>3}:

{@closeddate} - {help_desk.open_date} > 3

Go to edit selection formula->group and enter the formula there or use it as a suppression formula for the details section.

-LB
 
lbass, I do have {Help_Desk.Close_Date} and I am trying to run a report on closed calls that took longer than 3 days to resolve. I am sorry I wasn't clear.
 
In your record selection formula:

Not IsNull({Help_Desk.Close_Date}) and Datediff(&quot;d&quot;,{Help_desk.Open_Date},{Help_Desk.Close_Date})>3

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
I want to thank all of you for your help. I was able to achieve what I need with your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top