Print Page | Close Window

Issue: How to display is not null records

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2016
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
Printed Date: 05 Aug 2020 at 3:49am

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"
Else If [{?Code Not Null}] = "Show ALL"
Then {CUSTOMER.CODE} like '*'

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

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")
({?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