Print Page | Close Window

Custom null 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=22548
Printed Date: 29 Apr 2024 at 1:56am


Topic: Custom null value
Posted By: mh9876
Subject: Custom null value
Date Posted: 15 Feb 2018 at 5:36am
I'm trying to convert the null values of numeric field as '-'. My numeric field is formatted with currency '$'.
When I use the default setting to '-'. The null value appears as '$-'. However, I want it to appear as '-'.

The following code works for the string field. However, when I try this for the numeric field I get error message that a "number is required".

If IsNull({Command.NUMERIC_DATA_01}) OR {Command.NUMERIC_DATA_01} = ' ' Then '-' Else {Command.NUMERIC_DATA_01}

Please guide me as to how I can make this working on the numeric field. Thanks



Replies:
Posted By: DBlank
Date Posted: 26 Feb 2018 at 7:01am
set the formula to use default values for nulls

if {Command.NUMERIC_DATA_01}=0 then "-" else totext({Command.NUMERIC_DATA_01})



Print Page | Close Window