Plain text in RichEdit control

Posted by: lukie on 4 August 2017, 3:00 pm EST

  • Posted 4 August 2017, 3:00 pm EST

    I have a report where the detail-section contains a RichEdit control. When the data is not richtext, the control shows nothing.

    I've already checked http://www.datadynamics.com/forums/77364/ShowPost.aspx but this doesn't help.

    I'm using build 2.4.1.1283.


    Any idea ?

  • Replied 4 August 2017, 3:00 pm EST

    Is the data mixed as RTF and text in the same column in the database table? If that is the case, you can read that column in FetchData into a string variable. In Detail format check if the first character in the string is "{" then the text is RichText :

    Private Sub Detail_Format()
        If Left(memo, 1) = "{" Then
            Me.RichEdit1.TextRTF = memo
        Else
            Me.RichEdit1.Text = memo
        End If
    End Sub

    This won't work if the plain text values start with the character "{" which is unlikely.
  • Replied 4 August 2017, 3:00 pm EST

    Great !

    Exactly what I needed !
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels