删除"\ n" RDLC报告PlaceHolder中的字符串的说明!!! [英] removing "\n" of a String in the RDLC report PlaceHolder!!!

查看:137
本文介绍了删除"\ n" RDLC报告PlaceHolder中的字符串的说明!!!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想创建一个RDLC报告,我想从数据库中获取的字符串中删除"\ n"(换行约束).然后我在RDLC中编写了一个表达式,如下所示将其删除

Hi i just want to created a RDLC report and i want to remove "\n" (newline constraint) from the string i got from database. then i wrote a Expression in the RDLC to remove it as follows

=First(Fields!conAddress.Value, "HAWBDt").ToString().Replace("\n"," ")



但这没用.


我从数据库中获取的字符串如下,我想从字符串中删除该"\ n".




but it didn''t worked.


the String i got form the database as follows and i want to remove that "\n" from the String.


2nd FloorHolden House,\n57 Rathbone Place,\nLondon,\nUK




如果有人可以在这个问题上为我提供帮助,那将对我有很大帮助.谢谢!!




if anyone could help me on this matter that would be a great help to me.thanks in advance!!!

推荐答案

尝试转义斜线,因为在这种情况下您的意思是反斜杠:
Try escaping the slash because you really mean a backslash in this case:
=First(Fields!conAddress.Value, "HAWBDt").ToString().Replace("\\n"," ")


祝你好运!


Good luck!


这篇关于删除"\ n" RDLC报告PlaceHolder中的字符串的说明!!!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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