0
votes

I am trying to write a simple formula in Crystal reports. I created a parameter and I am evaluating another field. Here is an example of my formula:

if {COATSEndAssignment.end_date} = "  /  /       :  :   AM" then 
CStr (?custEndDate,"MM/dd/yyyy")

I know {COATSEndAssignment.end_date} = " / / : : AM" is a true expression.

?custEndDate is in a date format and I would like to convert it to a string in the format of "MM/dd/yyyy".

When I type the formula above, I get the error "The ) is missing." when I try to save the formula. I have read that there is a possibility I am missing a dll for Crystal Reports, but no where can I find which dll is missing.

I am using Crystal Reports 2011 and I am passing the ?custEndDate parameter in from Visual Studio 2010 and the value is: #03/21/2014#.

Can anyone tell me what is wrong with my formula, or tell me what dll I am missing?

1

1 Answers

5
votes

Curly braces ({}) are required for all fields:

if {COATSEndAssignment.end_date} = "  /  /       :  :   AM" then 
  CStr({?custEndDate},"MM/dd/yyyy")