I'm trying to export my reports in Excel format using the CR10 version
with the "Column width based on objects in the Details" option.
I've been able to do it in CR11, but for some reasons I am restricted
to use CR10 in that project.
Working in CR11 (note code is in c#, hoping it's no problem):
crReportDocument = new ReportClientDocument();
crReportDocument.ReportAppServer = ConfigurationSettings.AppSettings["RASServer"];
filename = "rassdk://" + this.m_applicationPath + Reports\\" + this.m_ReportFile;
crReportDocument.Open( ref filename, 1 );
SetFormulaFields( crReportDocument );
crReportDocument.DatabaseController.SetDataSource(DataSetConverter.Convert(ds),crReportDocument.Database.Tables.Alias, ds.Tables.TableName );
PrintOutputController ctrl = crReportDocument.PrintOutputController;
CrystalDecisions.ReportAppServer.CommonObjectModel.ByteArray byteArray = null;
ExcelExportFormatOptions excelOptions = new ExcelExportFormatOptions();
excelOptions.BaseAreaType = CrAreaSectionKindEnum.crAreaSectionKindDetail;
ExportOptions exportExcel = new ExportOptions();
exportExcel.FormatOptions = excelOptions;
byteArray = ctrl.ExportEx(exportExcel);
There is no ExportEx method attached to the PrintOutputController
object. I am using
byteArray = ctrl.Export(CrReportExportFormatEnum.crReportExportFormatMSExcel, 1);
Anybody has an idea on how to set the excel options in CR10 like we can do in CR11?