Eliminate zero bars in a bar chart

Thursday 8 January 2015 @ 11:02 pm

What if you have a bar chart and some of the bars are at zero? Maybe that information is useful but sometimes you may want those zero bars to be skipped. One method is to exclude the zero records, but what if they are needed by other parts of the report? I just found a relatively easy way to exclude zero bars from a chart, without eliminating the zero records from the report.

For example, say you are doing an “advanced” chart (not a group chart). You want one bar per customer so the Customer field is the “On change of” field.  The field {@FedEx Counter} is the “show values” field and it is set to sum.  You preview and you see several customers have no fedex orders so their name shows an empty slot where their bar should be. Here are the steps to eliminate those:

1) Go into the Chart Expert and select the Data Tab.
2) Add the {@FedEx Counter} to the ‘on change of’ box as a second field.
3) Click the “order” button right below {@FedEx Counter}.
4) Change “in ascending order” to be “in Specified Order”.
5) On the specified order tab click “New” and type ‘zero’ as the group name.
6) Below {@FedEx Counter} select “is greater than” 0.
7) Click on the “Others” tab and select “Discard all others”.
8) Click OK > OK to get back out.

You should see all the zero bars disappear.









Leave a Reply

Jeff-Net
Recrystallize Pro

Crystal Reports Server