Skip to main content
Solved

Emails and (devexpress) reports with "embedded" images

  • December 18, 2020
  • 1 reply
  • 248 views

Ricky
Superhero
Forum|alt.badge.img+8

Hi,

Currently we write a html(body) file as the actual email - where we for example want to have a company logo embedded in the email.  (as in <img src=”...”>). Then we start the smtp_connector and use this html(body) as input. For DevExpress this a html(body) content that is provided from a view column. (Which in turn will generate a pdf report with the image embedded).

Can you share your best practice for this and how you have implemented these embedded images?

(i.e. use an external website (and how do you serve/upload the picture?) or use CID or base64 or ???)

Thanks

Ricky

ps. The email variant will not embed the picture due to the location of the <img src=”\\somelocalserver\picture.png”>, the DevExpress report will work just fine. changing the location of the picture to say for example https://i.imgur.com/tt5Vrmp.png (as you do for your emails) will surely work for emails but I haven’t checked if this would work for DevExpress reports

Best answer by Mark Jongeling

Hi Ricky, 

The method that is commonly used is converting a varbinary string to a base64 string and then using <img src=data:image/png;base64, ...> inside a HTML field in DevExpress. This way you can save png files in the database as varbinary strings and use them inside DexExpress reports as pictures.

Kind regards,
Mark Jongeling

View original
This topic has been closed for comments

1 reply

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • February 2, 2021

Hi Ricky, 

The method that is commonly used is converting a varbinary string to a base64 string and then using <img src=data:image/png;base64, ...> inside a HTML field in DevExpress. This way you can save png files in the database as varbinary strings and use them inside DexExpress reports as pictures.

Kind regards,
Mark Jongeling


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings