cancel
Showing results for 
Search instead for 
Did you mean: 

suppressing zero values in crystal report bar chart

Former Member
0 Kudos

Hi,

I have a bar chart, that plots 5 bars for each year. In some years, some of the data values are zero. How can I prevent the zero values to be plotted  in the chart. Also if they are suppressed, I don't want any gap between the bars. All helps appreciated. I have attached an image.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

JWiseman
Active Contributor
0 Kudos

hi Feroz Khan,

you can prevent the actual bar from being plotted (or a chart group / on change of value from being shown) by using a formula for your On Change Of. as an example, extract the contents of the attachment and change the .txt to .rpt.

note that the On Change Of uses a formula to change all 0 / zero value groups to ''. this way all groups with 0 bars will be under the '' value.  you can't actually get rid of this '' value from the chart as you'll see a space at the beginning of the chart, but that should be a minor issue.

there is also a text object with a white background placed over the 0 / zero value of the '' group.

the other way is to create a subreport that contains only the chart and have any zero records eliminated in the subreport record selection...this is a bit more work.

for the other label question in the image you cannot control the position of the labels other than the options in the Format Data Label > Layout options.

cheers,

jamie