Symptom
- How to eliminate the bars having null values on a chart?
- How to only show bars which have values on the x-axis of a chart in Crystal Reports?
- Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off any relational data source.
- Insert a Bar Chart on the report.
- Notice one of the bar on the chart display count for NULL values. How to not show the NULL on the chart?
Resolution
- To not display a bar for the row of data that is empty, eliminate the data of coming on the report adding a Record Selection Formula.
- In Crystal Reports, open the report on which you have the Bar Chart.
- Under the menu "Report", select "Formulas - Record"
- Inthe Record Selection Formula Editor window, write a formula to filter the empty data of coming on the report, for the database field used on the chart. The formula will look like:
If {Database Field Name} <> "" Then True
Note: {Database Field Name} is the name of the database field used on the a-axis of the Bar Chart.
- Click on "Save and close".
- Now the Bar Chart only shows the bars that have data only.
Keywords
remove,ignore,null values ,empty series , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports all versions
SAP Knowledge Base Article - Public