Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Show zero sums on chart Post Reply Post New Topic
Author Message
mbrayco
Newbie
Newbie


Joined: 17 Apr 2012
Online Status: Offline
Posts: 13
Quote mbrayco Replybullet Topic: Show zero sums on chart
     Posted: 30 Oct 2012 at 6:50am
Hello all,
 
I am working on revising an existing Crystal Report that was created years ago while my company was connected to a Pervasive database.  We currently use Crystal XI R2 connected to an MS SQL database.  The report was designed to show total sales for company dealers each year for the current year and the past five years (in numerical form and as a 3-D bar-graph chart), along with trend information.  However, if a given year for a given dealer sums to zero (i.e., there were no sales for that dealer for that year), no bar shows up on the chart.  For example, one dealer had no sales for three of the six years, so only three bars would show on the chart.  I would like all six years to show on the chart for all customers, even if the sales for a given year sum to zero.  Is there a way I can force the chart to show a zero value (a flat square or something)?  The charts are set to auto scale, but always show zero as a minimum value on the y-axis.  Any thoughts?
 
Thanks,
 
Michael
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 30 Oct 2012 at 9:14am
You could try setting the minimum value of the y-axis to -.001.  If you're just showing whole numbers or to two decimals in the labels on the axis, it should look just like 0 but might still give you the square you're looking for (I haven't tried this, so I don't know for sure...)
 
-Dell
IP IP Logged
shanth
Groupie
Groupie


Joined: 06 Aug 2012
Location: United States
Online Status: Offline
Posts: 75
Quote shanth Replybullet Posted: 30 Oct 2012 at 9:15am
Create or modify new/ existing sales formula to something like:
IF ISNULL({Field/Formula}) THEN 0 ELSE {Field/Formula}

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