SAP Knowledge Base Article - Public

1312481 - How to create charts showing percentage of two fields in Crystal reports?

Symptom

How to show percentage value of a field against another field.

For Example: Need to show percentage of Last Year’s sales for each country.

Reproducing the Issue

  • Crystal Reports XI Release2
  • Crystal Reports 2008 V0
  • Crystal Reports 2008 V1

Resolution

  1. Create Crystal report based on Customer table in Xtreme sample database.
  2. Create a new formula and name it as Test.
  3. Write following code in it: ({Customer.Last Year's Sales}/Sum ({Customer.Last Year's Sales}))*100
  4. Click Save and close.
  5. Insert a chart of a desired type.
  6. In Chart Expert on Data tab select Customer.Country in ‘On change of’ section.
  7. Select the ‘’Test’ formula un ‘Show values’ section.
  8. Click on the ‘@Test’ formula to select it and Check the checkbox for ‘Don’t Summarize’.
  9. Click OK to create the chart.
  10. Right click on chart and open the chart Options.
  11. On Legend tab check the checkbox for ‘Show Percents’.

Keywords

KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2