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

Formula question

Status
Not open for further replies.

hereigns

MIS
Sep 17, 2002
172
US
We are working on converting a report from CR 8.5 to 10.0 and am having difficulty with the formula listed below. I'm certain it is a syntax misplacement but if anyone has any ideas on the correct syntax for this to work it would be greatly appreciated. Thank you!

or Not
DTSToDate tblServiceOrders.DateRequested in cdate 2004,9,1 to cdate 2004,9,30
and Not
DTSToDate tblServiceOrders.DateRequested in cdate 2004,12,1 to cdate 2004,12,30
and Not
DTSToDate tblServiceOrders.DateRequested in cdate 2003,9,1 to cdate 2003,9,30
 

or
(
Not (DTSToDate({tblServiceOrders.DateRequested}) in cdate (2004,9,1) to cdate (2004,9,30)) and
Not (DTSToDate({tblServiceOrders.DateRequested}) in cdate (2004,12,1) to cdate (2004,12,30)) and
Not (DTSToDate({tblServiceOrders.DateRequested}) in cdate (2003,9,1) to cdate (2003,9,30))
)

You need to use parens to clarify how the "or" should be interpreted.

-LB
 
I'd advise splitting the command up into several separate formula fields, which can then be tested individually. So @Range1 could be (DTSToDate({tblServiceOrders.DateRequested}) in cdate (2004,9,1) to cdate (2004,9,30)) and you'd test not @Range1, etc. You could evenlump the three rate tests as another formula field, say @BadRanges. Have the initial test and then or @BadRanges. Much safter and easier to maintain.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top