找回密码
 立即注册

QQ登录

只需一步,快速开始

songxianbin_xxx

高级会员

50

主题

153

帖子

1216

积分

高级会员

积分
1216
songxianbin_xxx
高级会员   /  发表于:2017-9-29 11:23  /   查看:2813  /  回复:3
我用下面这串语法来用来上下句的换行连接,在本地运行查看是会换行的,但是导出WORD后缺不会换行。我想达到换行的效果,应该怎么写?怎么实现导出WORD后也能自动换行。




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

3 个回复

倒序浏览
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-9-29 15:52:09
沙发
您好,你导出用的是哪个写法写的。
您用下面这种导出方法试试
GrapeCity.ActiveReports.PageReport report = new GrapeCity.ActiveReports.PageReport();GrapeCity.ActiveReports.Document.PageDocument reportDocument = new GrapeCity.ActiveReports.Document.PageDocument(report);// Create an output directory.System.IO.DirectoryInfo outputDirectory = new System.IO.DirectoryInfo(@"C:\MyWord");outputDirectory.Create();// Provide settings for your rendering output.GrapeCity.ActiveReports.Export.Word.Page.Settings wordSetting = new GrapeCity.ActiveReports.Export.Word.Page.Settings();// Set the FileFormat property to .OOXML.wordSetting.FileFormat = GrapeCity.ActiveReports.Export.Word.Page.FileFormat.OOXML;// Set the rendering extension and render the report.GrapeCity.ActiveReports.Export.Word.Page.WordRenderingExtension wordRenderingExtension = new GrapeCity.ActiveReports.Export.Word.Page.WordRenderingExtension();GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(outputDirectory.Name));// Overwrite output file if it already exists.outputProvider.OverwriteOutputFile = true;reportDocument.Render(wordRenderingExtension, outputProvider, wordSetting);      

回复 使用道具 举报
songxianbin_xxx
高级会员   /  发表于:2017-9-29 16:39:05
板凳
KearneyKang 发表于 2017-9-29 15:52
您好,你导出用的是哪个写法写的。
您用下面这种导出方法试试
GrapeCity.ActiveReports.PageReport repor ...

这个写在哪里啊????
回复 使用道具 举报
KearneyKang讲师达人认证 悬赏达人认证
超级版主   /  发表于:2017-9-29 17:28:44
地板
如果您的导出是自定义的,并且导出代码是在后台实现的,替换哪里的导出代码就可以。
如果您的导出是Webviewer或者Html5Viewer上集成的,就不能修改。因为原则上导出的样子是跟预览的结果一样的。
您换这种表达式试试:
=Fields!产品ID.Value & chr(10) &  Fields!产品名称.Value
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部