cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports return empty data

hidayatmh
Discoverer
0 Kudos

Hello, I'm new to using Crystal Reports. I created a custom report to display data from views and tables. when using a formula or field to display data, no data is displayed even though the data is in the database. Is any suggestions to fix this? I had try with condition from another fields:

<code>IF NOT ISNULL({@batch_number}) AND NOT ISNULL ({@batch_name}) THEN 
    {AR_GLPOST_3.NAMECUST}
ELSE
    "EMPTY"

or

if isNUll({AR_GLPOST_3.NAMECUST}) THEN "why is it empty?" ELSE {AR_GLPOST_3.NAMECUST}

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

In the menu bar at the top of the Formula Editor, make sure that null handling is set to "Exceptions for Nulls" instead of "Default Values for Nulls". When Default Values is selected, IsNull doesn't work.

-Dell

hidayatmh
Discoverer
0 Kudos

The setting for Null Handling has been replaced with "Exception for Nulls". What I expect is that the NULL value has a string value. but in this case the string does not appear. Maybe the method that I have tried is wrong, what method do you think you suggest?

DellSC
Active Contributor

Null and an empty string are different, so you have to check for them separately. Try changing your formula to something like this:

IF NOT ISNULL({@batch_number}) AND {@batch_number} <> "" and
   NOT ISNULL ({@batch_name}) AND {?@batch_name} <> "" THEN 
    {AR_GLPOST_3.NAMECUST}
ELSE
    "EMPTY"

-Dell

Answers (0)