Replace characters with Line feeds
Replace characters with Line feeds
Hello
I`m trying to create a function, that replaces a substring of characters, with a line feed, so I can display a multiline field in the report. I have created something like this:
Public Sub Text98__GetValue(ByVal sender As Object, ByVal e As Stimulsoft.Report.Events.StiGetValueEventArgs)
cEnter = Chr(13) & Chr(10)
e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiFunctionsStrings.Replace("hola//mundo","//",cEnter, true))
End Sub
The problem is, that it displays:
hola"&Microsoft.VisualBasic.ChrW(13)mundo
As it not replacing with the chr(30) and chr(10) characters that makes the enter. Any suggest?
Regards.
I`m trying to create a function, that replaces a substring of characters, with a line feed, so I can display a multiline field in the report. I have created something like this:
Public Sub Text98__GetValue(ByVal sender As Object, ByVal e As Stimulsoft.Report.Events.StiGetValueEventArgs)
cEnter = Chr(13) & Chr(10)
e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiFunctionsStrings.Replace("hola//mundo","//",cEnter, true))
End Sub
The problem is, that it displays:
hola"&Microsoft.VisualBasic.ChrW(13)mundo
As it not replacing with the chr(30) and chr(10) characters that makes the enter. Any suggest?
Regards.
Replace characters with Line feeds
Hello,
Can you please send us a sample which reproduces the issue for analysis.
Thank you.
Can you please send us a sample which reproduces the issue for analysis.
Thank you.
Re: Replace characters with Line feeds
I have the same issue when I use replace function it does't work.
{Replace(Table2.desc,"\n"," ")}
{Replace(Table2.desc,"\n"," ")}
Re: Replace characters with Line feeds
Hello.
Please, try to use next expression:
If it doesn't help, send us a report template with sample data which reproduces the issue.
Thank you.
Please, try to use next expression:
Code: Select all
{Replace(TextBoxControl1.Text,"\r\n"," ")}
Thank you.
Re: Replace characters with Line feeds
I want to put that in expression where bind datacolum to textcontrol. Can I replace \n from Datatable column and assigne to text control.
Re: Replace characters with Line feeds
Hello.
Thank you.
Yes, you can set your data column as the first argument of the Replace function.roomy wrote:I want to put that in expression where bind datacolum to textcontrol. Can I replace \n from Datatable column and assigne to text control.
Thank you.