Print Page | Close Window

Only show results if field has a value

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=22658
Printed Date: 27 Apr 2024 at 10:24pm


Topic: Only show results if field has a value
Posted By: shabbaranks
Subject: Only show results if field has a value
Date Posted: 15 Aug 2018 at 12:44am
Hi,
I have a purchasing report where stock can be assigned to a location or not. If the stock is stored in a location the location field will contain a value, if its not stored in a location the field is blank.

How can I filter the report to show records if the stock location contains a record?

Appreciate I could do if statements that reference the stock location ID but I thought there might be an easier way?
Thanks



Replies:
Posted By: kevlray
Date Posted: 15 Aug 2018 at 7:20am
In the select query you can put in a expression in the formula editor like this
 len({someField}) > 0

The somefield would be the location field in your case.  Also in the formula workshop be sure to select Default Values for Nulls (the Exception For Nulls selection may cause an issue).



Print Page | Close Window