Skip to Content
Former Member
Apr 12, 2007 at 04:15 AM

Export to ExcelDataOnly - Simplify Page Header


Post Author: PeterLiebich

CA Forum: Exporting

Product: Crystal Reports 11

Version: Release 2 for Visual Studios 2005 (version 11.5)

I have a VS application which uses the CrystalReportViewer to display reports etc over the Web.

I have an issue when a report is exported to Excel Data Only format.

The report is exported with the option "Simplify Page Headers" enabled. I need to export with this option unchecked from the CrytalReportViewer control.

This was working correctly when I was using Crystal Reports 11 version 11.0

There is an article for crystal 8.5 which talks about registary keys - but I have no idea what is required for Crystal 11 Release 2.

Note I have a batch application which runs a report and then exports it. As the export is done under program control I can specify the option but this is not possible when exporting from a web page

The code to set the option in Batch


Dim MyReportDocument As CrystalDecisions.CrystalReports.Engine.ReportDocument

Dim MyExportOptions As CrystalDecisions.Shared.ExportOptions

Dim MyExcelDataOnlyOptions As New CrystalDecisions.Shared.ExcelDataOnlyFormatOptions

If RequiredExportFormatType = CrystalDecisions.Shared.ExportFormatType.ExcelRecord Then

MyExcelDataOnlyOptions.ExcelUseConstantColumnWidth = False

MyExcelDataOnlyOptions.ExportObjectFormatting = False

MyExcelDataOnlyOptions.ExportImages = False

MyExcelDataOnlyOptions.UseWorksheetFunctionsForSummaries = False

MyExcelDataOnlyOptions.MaintainRelativeObjectPosition = False

MyExcelDataOnlyOptions.MaintainColumnAlignment = False

MyExcelDataOnlyOptions.ExportPageHeaderAndPageFooter = True

MyExcelDataOnlyOptions.SimplifyPageHeaders = False

MyExportOptions.ExportFormatOptions = MyExcelDataOnlyOptions

End If

'' set other details as required