Symptom
An ASP application uses the Report Designer Component (RDC) to view reports. When a report is exported from the RDC viewer page to Excel format, extra columns are inserted into the resulting XLS file. How can the report be exported without the addition of extra columns?
Reproducing the Issue
- Create a Crystal Report
- Deploy ASP application to export report to Excel format.
- View report using the ASP application.
- Note extra columns displayed in report output.
Cause
Resolution
This issue can be resolved by modifying the exporting routine in the RDCrptserver11.asp page.
Steps to resolve the issue:
- Locate the RDCrptserver11.asp page in your web application directory.
- Open the file for editing.
- Locate the section containing the statement:
Case "CRXF_XLS"
- Edit the section as follows:
Case "CRXF_XLS"
If CInt(exportType) = 10 Then
ExportOptions.FormatType = CREFTEXCELDATAONLY
Else
ExportOptions.FormatType = CREFTEXCEL
End If
GetExportPageRange startPage, endPage
'ExportOptions.ExcelUseConstantColumnWidth = FALSE
'ExportOptions.ExcelConstantColumnWidth = 36
'ExportOptions.ExcelAreaType = 4
ExportOptions.ExcelMaintainColumnAlignment = TRUE
ExportOptions.ExcelMaintainRelativeObjectPosition = FALSE - Save the file.
After completing these steps, extra columns won't be added when exporting reports to Excel format from the application.
Keywords
Excel RDC RDCrptserver11.asp , 8454345 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports XI ; SAP Crystal Reports XI R2