how to parse base64 string column to plain text to populate XRRichText?

Viewed 30

what I am trying to achieve is to show in the xtrareport a plain text from a base64 string (or a byte array of an XML), this is the data that's saved to the db:

byte[] fileContents = System.Convert.FromBase64String(obj.column);
obj.rtf_handler = fileContents;

and what I have achieved instead is this long string of un-parsed(?) rtf content. So how do you parse the 64base string from obj.rtf_handler to a plain text in xtrareport?

2 Answers

In DevExpress you can load RTF from a datasource but it seems that your base64 string representing a file and not its RTF content (which is similar to this).

A possible solution could be save your file using FileStream class and then read its RTF content using File.ReadAllText.

Related