I am using the DevExpress RichText editor and my clients use it to add and edit there documents that is used in reports. The rtf is saved in my SQL database as varchar(max). In the documents I have placeholders {PLACEHOLDER} that are replaced with relevant text and the content is then displayed in a Devexpress Report xrRichText component.
It all works well but now my clients want to put there signatures on the letters electronically. It work if you put an image component in the letter and import a image and save the document. The issue is there is plus minus 15 to 20 different letters and it someone leave the company they need to go and change all the signatures manually.
I have now enhanced my system to save the signature in a image field in the SQL database. What I need to achieve is to have a placeholder {SIGNATURE} and when I retrieve the rtf report from the database to replace the placeholder with the image saved in the database.
I have tried many different ideas but the placeholder is just replaced with binary code. Is there someone that can please xrRichText2 point me into the right direction. If possible I would like to do it in SQL with the replace function.
DECLARE @Image VARCHAR(max)
SELECT @Image = CONVERT(VARCHAR(MAX), Signature, 1)
FROM SignatureTable
UPDATE Docs
SET Doc = REPLACE(Doc, '\{SIGNATURE\}', @Image)
Thank you very much.