I have a report that I created in Crystal 10 that is accessing a datasource on an iSeries system using the Client Access ODBC connection. When I run the report via Crystal Reports, the report runs with no issues.
When I try to run the report using Logicity, I get an error on one of my formulas in the report:
A month number must be between 1 and 12
Details: errorkind
Error in.......
Error in formula <from_date>.
The formula for from_date is:
Local NumberVar date_val;
Local StringVar str_date;
date_val := {CKTIMEFL.TIPSTR};
str_date := CStr(date_val);
If date_val > 0 then
CDate (ToNumber(Mid(str_date,1,4)),
ToNumber(Mid(str_date,5,2)),
ToNumber(Mid(str_date,7,2))
);
The formula is converting a unique numeric date/time value into a regular date value. The only thing I can think of is that the libraries Logicity is using treat a zero field differently than how Crystal 10 is, and the formula is throwing an exception when the first record is found where TIPSTR is 0.
I get the error no matter if I run it on my PC or a PC with just Logicity installed.
Any ideas?
Brett