Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Null values as "Zero" instead of blank Post Reply Post New Topic
Author Message
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Topic: Null values as "Zero" instead of blank
     Posted: 09 Aug 2013 at 9:28am
I have a report that I am writing that is targeting several different datasets.  To make this a litle easier I am using Subreports fo the info in each set. 
 
I am trying to add up the total quantity of what I have for equipment regardles of the serial number.  So in my subreport I am doing a sum on the quantity field. 
 
When my data is displayed anything that is "null" shows as a blank.  How can I get these blanks to show as a "0"?
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 12 Aug 2013 at 12:10am
Hi,
 
Try the below logic
 
if IsNull(Database field) = TRUE then
0
else
Database field.
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 12 Aug 2013 at 1:48am
That did not work
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 12 Aug 2013 at 2:09am
Which formula is giving Null values?
Could you post your formula in the thread so that it is easy to understand your problem..
and where you are showing that result (from Main to Sub or Sub to Main report)
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
bremen
Groupie
Groupie
Avatar

Joined: 28 May 2013
Online Status: Offline
Posts: 93
Quote bremen Replybullet Posted: 12 Aug 2013 at 2:18am

I am showing the results from a sub report.  

I input the exact formula posted above and there are still blanks in the coming from the sub report.  I am also Suming the results from that formula. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2013 at 3:22am

I assume you are using a shared variable in a formul ain the subreport to pass back to the main report.

In the sub report variable formulas set the option inside each formula to 'use defualt value for nulls'
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum