救命!!!!!!! Crystal Reports中的换行处理 [英] HELP!!!!!!! Line Feed Processing in Crystal Reports

查看:209
本文介绍了救命!!!!!!! Crystal Reports中的换行处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2005附带的Crystal Reports引擎,并且由于某种原因,报告中的文本字段不再处理换行符。所有嵌入的\ n字符都将被忽略,文本现在会在打印报告时一起运行。 VS 2003附带的Crystal Reports版本没有此"功能"。我在运行时使用以下代码段在代码中设置报告文本字段的值:

I am using the Crystal Reports engine that came with Visual Studio 2005 and, for some reason, the text fields in the reports no longer process line feed characters.  All of the embedded \n characters are ignored and the text now runs together when the report is printed.  The version of Crystal Reports that was included with VS 2003 did not have this "feature".  I am setting the values of the report text fields from within code at runtime using the following code segment:

sFieldName = " txtNarrative" ;

sFieldName = "txtNarrative";

reportObject = rptDoc.ReportDefinition.ReportObjects [sFieldName];

reportObject = rptDoc.ReportDefinition.ReportObjects[sFieldName];

text = reportObject as < font color ="#2b91af"size = 2> TextObject ;

text = reportObject as TextObject;

text.Text = sMainNarr;

text.Text = sMainNarr;

sMainNarr是一个嵌入了\ n字符的字符串。

sMainNarr is a string with embedded \n characters.

有人可以帮忙?????

Can someone help?????

谢谢!!!!!

推荐答案

我有同样的问题。看起来Crystal Reports中有一个错误。解决方法显示在以下URL中:

I had the same issue.  Looks like there is a bug in Crystal Reports.  The workaround is shown in the following URL:

http://tim.mackey.ie/CrystalReportsTextObjectIgnoresNewlineCarriageReturnRn.aspx

我尝试过并让它发挥作用。希望这会有所帮助。

I tried it and got it to work.  Hope this helps.


这篇关于救命!!!!!!! Crystal Reports中的换行处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆