Search code examples
c#asp.net-coredevexpressxtrareport

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


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?


Solution

  • After some research I have found that I needed to pass the value of the data as a string and then to base64 string and pass it to Memory Stream to get the file. Source: https://supportcenter.devexpress.com/ticket/details/t678278/xrrichtext-and-openxml