Solved "Isnull" not working, but "not isnull" will
Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21587
Printed Date: 05 May 2024 at 2:25pm
Topic: Solved "Isnull" not working, but "not isnull" will
Posted By: bremen
Subject: Solved "Isnull" not working, but "not isnull" will
Date Posted: 06 Jul 2015 at 6:51am
I am wanting to restrict my data based on simple logic. Only show me data if {table.field} is empty. So I tired using the following record selection formula
isnull({table.field})
The field is a string. When I refresh my data i return zero records. If I use the opposite not isnull({table.filed}) then the report returns records.
I have tried using default values and exceptions for null values with no luck.
|
Replies:
Posted By: DBlank
Date Posted: 06 Jul 2015 at 7:31am
are you sure it is NULL and not an empty string?
trim({table.field})=""
|
Posted By: bremen
Date Posted: 06 Jul 2015 at 8:04am
Posted By: kevlray
Date Posted: 06 Jul 2015 at 8:35am
I have gotten in the habit (thanks to Ken Hamady) to check for empty strings instead of nulls (i.e., Len({field}) = 0). I also set the Default Values for Nulls in the formula editor.
|
Posted By: bremen
Date Posted: 06 Jul 2015 at 8:42am
So how would I use either of these functions to limit the records returned by my report?
|
Posted By: DBlank
Date Posted: 06 Jul 2015 at 8:45am
in the select expert set the formula to 'use default values for nulls' and the criteria would be
trim({table.field})=""
If it is possible for users to enter a space (or more) into the field the trim will remove those
|
Posted By: bremen
Date Posted: 07 Jul 2015 at 12:30am
Now I got cha.
Thank you very much for the help.
|
|