Ticket T1094047
Visible to All Users

MailMerge and Images from DB

created 3 years ago

Hello

I' have been trying to add a blob field with an image into RichText.
At first I looked in your RichEditSimpleMailMergeDemo.
If I try to insert the field 'Photo' using ShowInsertMergeFieldForm action,
I get EVariantTypeCastError and the inserted code is <<Photo>>.

The only way to get the right result is using my own TdxInsertFieldCommand (sample.zip).

It seems, that inserting images from database using ShowInsertMergeFieldForm is not possible?
Or is there a better solution for my Requirement?

Thanks

Frank Reim

Answers

created 3 years ago

Hello Frank,

Thank you for the sample project.
You are right, there is no automatic conversion on inserting <<Photo>> code. The correct way to add a field is to use INCLUDEPICTURE.
You can override the TdxRichEditInsertMergeFieldForm dialog and add a method there that adds the correct command.
This approach was demonstrated in the following ticket: t1028694

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.