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

Condictional selection formula

Status
Not open for further replies.

plextor

IS-IT--Management
Jan 7, 2003
34
US
I'm attempting to perform a conditional formula displayed into a graph. However, I ran into a problem creating the formula. HEre's the fields and a brief explanation of what I'm attempting to do.

Fields:

1. {mApplicationStat.Timestamp} example: (CDateTime (2003, 05, 01, 00, 00, 00)
2. {mApplicationStat.Application} example: (imtw_support_app)


The Mission:

I have a graph that displays the sum of calls for a given month. The selection formula takes the calls that are answered within an application. What I would like to do is select a application for a specific dates and select another application for the rest of the dates. Then sumarize the calls answered within the applications for the given date range.

Failed Formula:

If ({mApplicationStat.Timestamp} = (CDateTime (2003, 05, 01, 00, 00, 00)) and
({mApplicationStat.Timestamp} = (CDateTime (2003, 06, 01, 00, 00, 00)) then
({mApplicationStat.Application} in "imts_fastdirect_app") else
{mApplicationStat.Application} in ["imts_techsupp2_app", "imts_saleshotline_app"]


CR VERSION: Crystal 9.0
Database: SQL 2000

Hope this makes sense.


Thanks for your help...

Brian
 
If ({mApplicationStat.Timestamp} = (CDateTime (2003, 05, 01, 00, 00, 00)) and
({mApplicationStat.Timestamp} = (CDateTime (2003, 06, 01, 00, 00, 00))

Here is where one problem is - {mApplicationStat.Timestamp} cannot be two values at the same time. You need to do either
Code:
If ({mApplicationStat.Timestamp} >= (CDateTime (2003, 05, 01, 00, 00, 00)) and 
({mApplicationStat.Timestamp} <= (CDateTime (2003, 06, 01, 00, 00, 00))
or
Code:
If ({mApplicationStat.Timestamp} = (CDateTime (2003, 05, 01, 00, 00, 00)) OR 
({mApplicationStat.Timestamp} = (CDateTime (2003, 06, 01, 00, 00, 00))

-Dell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top