SAP Knowledge Base Article - Public

1764096 - Rounded values exported to Excel format from Crystal Reports shows all Decimal points.

Symptom

Values rounded up to certain decimal places in Crystal Reports when exported to Excel format, shows all Decimal points.

Environment

  • Crystal Reports 2008
  • Microsoft Excel 97-2003

Reproducing the Issue

  1. Create a Blank Report.
  2. Insert a number field which has more than two decimal points.
  3. Right click on the field  >> Format field >> Number tab >> Style >> Select style up to two decimal point.
  4. Now export the report to  Microsoft Excel 97-2003 format.

Note: Now when the report is exported in Excel file it will show more than two decimal points. Refer the image given below.

export1.JPG

 

Cause

It is default behavior of the product

Resolution

  1. Right Click on the field >> Format field >> Common tab
  2. Select X-2 button against Display string and write the following formula in it

   ToText(Round({Field},2))

Now when the report is exported it will display up to two decimal places only. Refer the image given below.

export2.JPG

 

Keywords

Export, formatting , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1