AR_v10 报表格式问题
自定义FlashViewer按钮请参考:http://blog.gcpowertools.com.cn/post/2014/11/13/customize_flashviewer.aspxiceman 发表于 2015-9-9 11:39:00 http://gcdn.gcpowertools.com.cn/images/common/back.gif
已通过电话沟通... 您好,
关于导出excel的问题,参考代码
// Provide the page report you want to render.
GrapeCity.ActiveReports.PageReport _reportDef = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("/Reports/" + report + ".rdlx")));
//_reportDef.Report.DataSources.DataSourceReference = "";
//_reportDef.Report.DataSources.ConnectionProperties.DataProvider = "OLEDB";
//_reportDef.Report.DataSources.ConnectionProperties.ConnectString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};", Server.MapPath("/Data/NWind_CHS.mdb"));
GrapeCity.ActiveReports.Document.PageDocument _reportRuntime = new GrapeCity.ActiveReports.Document.PageDocument(_reportDef);
// Create an output directory
System.IO.MemoryStream ms = new System.IO.MemoryStream();
// Provide settings for your rendering output.
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings
excelSetting = new GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings();
excelSetting.FileFormat = GrapeCity.ActiveReports.Export.Excel.Page.FileFormat.Xlsx;
//excelSetting.MultiSheet = false;
//excelSetting.Pagination = false;
GrapeCity.ActiveReports.Extensibility.Rendering.ISettings setting = excelSetting;
//Set the rendering extension and render the report.
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension
excelRenderingExtension = new
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension();
GrapeCity.ActiveReports.Rendering.IO.MemoryStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.MemoryStreamProvider();
_reportRuntime.Render(excelRenderingExtension, outputProvider, excelSetting.GetSettings());
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("content-disposition", "inline;filename=中文说明.xlsx");
outputProvider.GetPrimaryStream().OpenStream().CopyTo(ms);
Response.BinaryWrite(ms.ToArray());
Response.End();
如果导出有格式问题,及时联系。 回复 2楼frank.zhang的帖子
好的,已收到 有问题及时联系。 回复 4楼frank.zhang的帖子
为什么只导出了当前页的数据呢? 您好,
导出word会导出报表内的所有信息,您需要确认这个报表的数据量。
您可以先尝试调试,如果需要我协助,需要您上传一个能够重现这个问题的例子程序。
页:
[1]