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
- Create Crystal report based on Customer table in Xtreme sample database.
- Create a new formula and name it as Test.
- Write following code in it: ({Customer.Last Year's Sales}/Sum ({Customer.Last Year's Sales}))*100
- Click Save and close.
- Insert a chart of a desired type.
- In Chart Expert on Data tab select Customer.Country in ‘On change of’ section.
- Select the ‘’Test’ formula un ‘Show values’ section.
- Click on the ‘@Test’ formula to select it and Check the checkbox for ‘Don’t Summarize’.
- Click OK to create the chart.
- Right click on chart and open the chart Options.
- 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