我有一个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);你能告诉我是否有可能做我想做的事吗?
如果没有,你能给我推荐另一种方法吗?
发布于 2013-08-27 15:56:37
嗯,我刚学了一个小时左右的报告工具。但我认为您应该将PageHeader和PageFooter添加到报告中,并将所有页眉和页脚放在那里。当您导出它时,它们将出现在文档中。我试过了。
https://stackoverflow.com/questions/18328567
复制相似问题