SAP Knowledge Base Article - Public

1305169 - Cross-tab report exports column and row headers of numeric data type to excel as text, not as numeric

Symptom

Cross-tab column or row headers are from a field that is of numeric data type, but when exporting to excel, they become text data type, not numeric data type cell(s)

Reproducing the Issue

  1. Create a new Crystal Report connected to any database table with a field that is of numeric data type
  2. Insert a cross-tab to the report
  3. Add a numeric field to the cross-tab as the row or column header
  4. Export the report to Excel
  5. In Excel, notice the data type of the header field value is text, not numeric

Cause

  • Column and Row fields are used as 'headers' in a cross tab
  • They behave the same way that a "Group Name" field behaves, in a standard, non-cross-tab report
  • Group Name fields cannot be numeric, so if the value is numeric, it is converted to text before being displayed or exported in Crystal Reports

Resolution

  • It is not possible to export a column/row header as a number
  • The only way to change the data type to numeric, is after the export is complete, within excel

Keywords

exporting, string,decimal,formatting, cross tab, crosstab , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

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