TOPIC: Logicity 1.8.8.0 can't handle datetime2 values

Logicity 1.8.8.0 can't handle datetime2 values 04 Jan 2016 18:18 #2124

  • RonMoses
  • RonMoses's Avatar
  • Offline
After a morning of trying to figure out why my report is working fine in Crystal but failing in the Logicity Viewer, it appears to me that Logicity can't handle SQL datetime2 values. Calculating ISNULL() against one will always return TRUE, and running a DateDiff() will return an error:

Crystal Report Windows Forms Viewer
A date is required here.
Details: errorKind
Error in File datetime2 test {1C627B09-5185-46FF-BC45-FCAF740D071D}.rpt:
Error in formula DateDiffTest:
'DateDiff("d", CurrentDateTime, {USR_CredentialedStates.Effective_Date})'
A date is required here.
Details: errorKind

Even if I try to assign it to a DateVar and apply CDate to it, like so...
DateVar dDate := CDate({USR_CredentialedStates.Effective_Date});
DateDiff("d", CurrentDate, dDate);

I still get an error:

Crystal Report Windows Forms Viewer
Bad date format string.
Details: errorKind
Error in File datetime2 test {D91182C5-B952-4DEB-8497-9D213AF72561}.rpt:
Error in formula DateDiffTest:
'DateVar dDate := CDate({USR_CredentialedStates.Effective_Date});
'
Bad date format string.
Details: errorKind

Is this a known issue? I can get around it with a stored procedure, but I'm kinda surprised I need to.
The administrator has disabled public write access.