Error in formula when using BAQ in a Crystal Report

I am modifying one of our existing crystal reports to pull data from a BAQ instead of from an ODBC connection and I am having an error message “A date is required” with one of the formulas to calculate business days. The formula works perfectly in the ODBC connected report, but not in the same report that uses the BAQ. The BAQ definition for the report shows type “date” for all of the date fields. I have modified the syntax in the formula to use date() function for the date field, but even though it doesn’t throw an error, the calculated days are always zero.
I have included a few screen shots.

Any help would be greatly appreciated!

Daniel Dell’Aquila

I think I found the solution to my problem. For some reason the date fields in the BAQReportResult were converted to DateTime regardless that the BAQ definition is date. So I created a formula to convert to date each date used in the calculation and it works!

From what I’ve noticed, that’s just for display purposes inside of Epicor. The underlying data fields do not change unless you use conversion formulas in calculated fields.


Got it. Thank you Pedro.