嗨,我有一个XtraReport
,我想导出到 Excel 文件
,然后我需要打印它,但我丢失了所有页面格式(页眉、页脚、在每页上重复......)
string reportPath = "c:\\Test.xls";
// Create a report instance.
XtraReport1 report = new XtraReport1();
reportDS c = new reportDS();
c.Init();
// genereaza report
report.DataSource = new reportDS[] { c };
// Get its XLS export options.
XlsExportOptions xlsOptions = report.ExportOptions.Xls;
// Set XLS-specific export options.
xlsOptions.ShowGridLines = true;
xlsOptions.TextExportMode = TextExportMode.Value;
// Export the report to XLS.
report.ExportToXls(reportPath);
// Show the result.
StartProcess(reportPath);
你能告诉我是否有可能我想做什么?
如果没有,你能建议我另一种方法吗?