水晶报表:多行传递参数值 [英] Crystal Reports: Passing Multiline Parameter Values

查看:258
本文介绍了水晶报表:多行传递参数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一些参数传递给这样的水晶报表:

I want to pass some parameters to a Crystal Report like this:

ReportDocument.DataDefinition.FormulaFields[parameterName].Text   = 'Text';

这workes罚款,除非我想通过从ASPX多行文本框
(含\\ n和\\ r字符)。

This workes fine unless I want to pass a multiline textbox from ASPX (containing \n and \r chars.)

中的ReportViewer报告说,该字符串的匹配'缺失。

The reportviewer reports that "The matching ' for this string is missing.".

有任何实际的例子/列表/建议如何解析(多)文本和
使这项工作?

Is there any example/list/suggestion how to parse the (multiline) text and make this work?

谢谢,

斯特凡

推荐答案

如果您想保留换行符你应该模糊的东西如sindreĴ描述替换它们。为了使换行符在Crystal Reports中正确显示您需要更换一个水晶报表公式使用HTML休息的模糊字符。那么你的公式字段添加到报表,并单击鼠标右键,选择格式字段,选择段落选项卡,并更改'文本国米pretation'到'HTML文本。您还需要确保可以增大属性共同选项卡上选中。请参见下面的示例公式:

If you want to retain line breaks you should replace them with something obscure as described by sindre j. In order for the line breaks to display correctly in Crystal Reports you need to replace the obscure characters in a Crystal Report formula with html breaks. Then add your formula field to the report and right-click, select 'Format Field', select the 'Paragraph' tab, and change the 'Text Interpretation' to 'HTML Text'. You also need to make sure the 'Can Grow' attribute is checked on the 'Common' tab. See the example formula below:

< HTML和GT; +更换({ParameterField?},___,< BR>中)+< HTML />中

希望这有助于。

这篇关于水晶报表:多行传递参数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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