SAP Knowledge Base Article - Public

1476499 - Alignment of column changes while exporting the Crystal Report to Excel with higher version of Crystal Reports.

Symptom

  • Crystal Reports created in Crystal Reports XI.
  • On exporting the same report to Excel (97-2003) from a higher version of Crystal Reports, changes the alignment of the columns.

Environment

  • Crystal Reports XI.
  • Crystal Reports XI R2 SP2.
  • Crystal Reports 2008 V0.

Reproducing the Issue

  1. Create a report in Crystal Reports XI using Xtreme Sample Database, having text fields arranged  in the form of a tables, which has five columns and each column has three sub-columns under it.
  2. All the columns and rows have the database fields placed in the text boxes.
  3. For the main header column use text fields and give them names according to the data mentioned in the sub-columns.
  4. For the sub-columns use fields like Cust_number, Cust_city, Cust_country.
  5. Now export the report to Excel (97-2003) format.
  6. To export the report, go to File=> Export=>Export Report=> in the Format window select Excel (97-2003) => in the destination select the desired destination and click on OK.
  7. The column alignment is fine and the report is displayed correctly.
  8. Open the same report in CR XI R2 or CR 2008 and run the report in the designer, it runs fine.
  9. Now export the report to Excel (97-2003) format.
  10. The report will be displayed along with the column alignment being distorted.

Cause

This issue occurs due to the positioning of the text fields being different/changed when the report is developed in older version of Crystal Reports is opened in higher version of Crystal Reports.

Resolution

  1. Open the report in Crystal Report Designer.
  2. In Design view, click the vertical ruler to create a vertical guideline.  
  3. Click one of the fields in the section, and drag it to the vertical guideline. The field should snap to the guideline. When the corners  are highlighted in red, this indicates the field is snapped to the guideline. 
  4.  Repeat step 2 until all the fields in the section are snapped to the vertical guideline. 
  5. Set the object’s size and position by right-clicking the field, selecting Object Size and Position and then setting the XY coordinates.   
  6. Use the horizontal and vertical rulers as a reference when specifying height, width, and XY coordinates. 
  7. Export the report to Excel and all the fields in the section will appear in the same column. The columns will not be distorted.                                                             

Keywords

Column, positioning, excel, 2008, distorted. , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

Crystal Reports 2008 V1