static void ExportHTML() { Report report = new Report(); // 根据不同的数据源增加连接方式,比如:JSON、Oracle、Mysql等 RegisteredObjects.AddConnection(typeof(JsonDataConnection)); report.Load("d:\请假申请单.frx"); report.SetParameterValue("userName", "周杰伦"); report.SetParameterValue("remark", "今天想休息一天"); HTMLExport export = new HTMLExport(); export.SinglePage = true; try { report.Prepare(); using (MemoryStream ms = new MemoryStream()) { report.Export(export, ms); string content = Encoding.UTF8.GetString(ms.ToArray()); File.WriteAllText("d:\请假申请单.html", content); } Console.WriteLine("导出成功"); } finally { export.Dispose(); } }
版权声明:
本文来源网络,所有图片文章版权属于原作者,如有侵权,联系删除。
本文网址:https://www.bianchenghao6.com/java-jiao-cheng/9883.html