SAP Knowledge Base Article - Public

1805391 - How to export a number and a string value for same column to Excel in Crystal Reports Designer.

Symptom

  • How to export a number and a string value for same column to Excel.
  • Exporting multiple data type on a single column.

Environment

  • Crystal Reports 2008
  • SAP Crystal Reports 2011

Resolution

  1. Insert the database field e.g. field1 on the report on which value returned must be number and if it is a NULL return NA.
  2. Create a formula @test which has the same database field as: {field1}
  3. Right click  on the field object.
  4. Select Format Field…
  5. Under Common tab go to X-2 of Suppress.
  6. Add the suppression formula as:
    If isnull({field1}) then “NA”;
  7. Save and close the formula editor. Click OK.
  8. Right click  on the formula object.
  9. Select Format Field…
  10. Under Common tab go to X-2 of Suppress.
  11. Add the suppression formula as:
    If not (isnull({field1})) then {@test};
  12. Save and close the formula editor. Click OK.
  13. Place both the field and the formula field such that, they overlap.

Keywords

Export to Excel string and number value, Multiple data type on same field , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2001 V1