Click here to Skip to main content
12,820,239 members (24,902 online)
Click here to Skip to main content
Add your own
alternative version


4 bookmarked
Posted 21 Nov 2012

Suppress field in Crystal Reports

, 5 Dec 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
Suppress field in Crystal Reports.


When implementing a system we are normally inserting default values for the fields in the database rather than inserting NULL values. But when we are retrieving data from the database and visualizing them from a report, all the default values come to the report.


To overcome the situation, we can use two methods. One method is mention that default value on a report and consider it as default value to that relevant field. 

Using the code

The other method is use the Suppress option given by the Crystal Reports engine. To use that option, first you have to create the report the normal way.  Then select the field you have to suppress and right click on it. Then you have to select Format Object menu item from the popup menu.

Then it will open the Format Editor window which will enable us to do formatting. Now navigate to the Common tab of the window. Now check the Suppress check-box and click the button in front of the Suppress check box. 

The Formula Workshop window will then open. 

In here you have to provide a boolean value. Based on it, the value of the field will visible in Crystal Reports. If the provided statement is true, then the field value will be displayed. If the statement is false, then the field value will not appear. 

In this scenario, the default value is 1901/01/01. To suppress this, I wrote a formula which checks whether the value of the field is 1901/01/01 or not.


The original blog post can be found in my blog from this link.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Eranda Ketawalage
Systems Engineer
Sri Lanka Sri Lanka
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170308.1 | Last Updated 5 Dec 2012
Article Copyright 2012 by Eranda Ketawalage
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid