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

Does this formula look correct?

Status
Not open for further replies.
Nov 7, 2005
103
US
I am using Crystal 8.5 reading from a ProISAM database. Will this return only data that matches the below criteria or will it execute the formula to data that matches the below criteria and show all other data in the database?


if {WOMS.WOMS_DAYS_INC} = 56 and {WOMS.WOMS_LAST_DATE} > {RSCD.RSCD_DATE_OUT}
then DateAdd( 'd', 56 , {WOMS.WOMS_LAST_DATE} )
else if {WOMS.WOMS_DAYS_INC} = 56 and {WOMS.WOMS_LAST_DATE} <= {RSCD.RSCD_DATE_OUT}
then DateAdd( 'd', 56 , {RSCD.RSCD_DATE_OUT} )
else if {WOMS.WOMS_DAYS_INC} = 90
then DateAdd( 'd', 90 , {WOMS.WOMS_LAST_DATE} )
else if {WOMS.WOMS_DAYS_INC} = 365
then DateAdd( 'm', 12 , {RSCD.RSCD_DATE_OUT} )
 
From your post, it is not clear where this "Criteria" (your word) is at. Is this in a Formula?, the Select Expert? A SQL Expression? Where?

It almost looks like you are trying to WRITE to a database.

i.e. "else if {WOMS.WOMS_DAYS_INC} = 56 and {WOMS.WOMS_LAST_DATE} <= {RSCD.RSCD_DATE_OUT}
then DateAdd( 'd', 56 , {RSCD.RSCD_DATE_OUT} )"

DataDog
'Failure Is Not An Option'
 
sorry this is a formula in a formula field called @ServDue. it is reading from the other fields and displaying the outcome in the field @ServDue.

hope that helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top