cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to handle SQL NULL dates in CRUFL function for Crystal Reports?

junrayb86
Discoverer
0 Likes
377

In VB6, the Date type can accept Crystal Reports' internal "null date" sentinel (12/30/1899) so formula does not break. In C#, a DateTime parameter cannot accept NULL. If Crystal pass a NULL value, you will hit "Not enough memory operation" error. If "DateTime?" parameter will be used, the CRUFL function will not appear in the Formula Editor.

View Entire Topic
DonWilliams
Active Contributor
0 Likes

What version of CR for VS are you using?

What Version of Crystal Reports are you using?

What version of VS are you using?

In CR designer click on File, Options and check this option:

DonWilliams_0-1773915439015.png

See if that resolves your issue...

See this sample UFL project: https://userapps.support.sap.com/sap/support/knowledge/en/1603381

 

DonWilliams
Active Contributor
0 Likes
Pass in the same default null date as CRD uses....
junrayb86
Discoverer
0 Likes
Thanks for the response. However, changing the Null Treatment to "Default Values for Nulls" does not resolve the issue. I still encounter the "Not enough memory for operation." error. I am using CR 2016 and compile the CRUFL DLL using VS 2022.
DonWilliams
Active Contributor
0 Likes

Did you have a look at the sample UFL I linked, lot's of info in it on how to make CRD recognize the UFL?And set's the Framework CRD works under for the UFL to use using an INI file.

What SP version of CR for VS .NET are you using?

Note that CR 2016 is a 32 bit app so you must compile the UFL in 32 bit for CRD to find it.

Since you are using VS 2022 you must use the CR for VS 64 bit installer, you can install the 32 bit runtime when it prompts at the end of the install.