Print Page | Close Window

Issue: How to display is not null records

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=13442
Printed Date: 24 Apr 2024 at 2:58pm


Topic: Issue: How to display is not null records
Posted By: HHGregg
Subject: Issue: How to display is not null records
Date Posted: 08 Jun 2011 at 8:10am
Hey All,

Crystal Report and syntax noobie here. 

Issue:  I'm trying to create a parameter that if it is equal to "Is Not Null" then it will return all customers where the customers.code field is not null.  I will default the value to "Show All" so the report will show all records no matter if the code value is null or not.

I've tried the below in the Selection Expert, but it isn't doing what I'm wanting to do.  Thanks for your help.

If [{?Code Not Null}] = "Is Not Null"
Then isNULL({CUSTOMER.CODE) = False
Else If [{?Code Not Null}] = "Show ALL"
Then {CUSTOMER.CODE} like '*'



Replies:
Posted By: comatt1
Date Posted: 08 Jun 2011 at 9:36am
I either use len({#field})<1 or
not(isnull({#field}))


Posted By: DBlank
Date Posted: 08 Jun 2011 at 10:11am
I am understanding this as your select statement with a paramater
 
(NOT(ISNULL({CUSTOMER.CODE)) and {?Code Not Null} = "Is Not Null")
or 
({?Code Not Null}] = "Show ALL")


Posted By: HHGregg
Date Posted: 09 Jun 2011 at 8:41am
I tried DBlank's suggestion and it worked!  Thanks so much!



Print Page | Close Window