We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MailMerge removing content in document

Thread ID:

Created:

Updated:

Platform:

Replies:

131148 Jun 23,2017 02:12 PM UTC Jun 26,2017 06:25 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: DocIO
lalleman
Asked On June 23, 2017 02:12 PM UTC

Hi, 
I have a question about performing Mail merge with business objects, as described in help.syncfusion.com.

I made a word template to report Employees Orders's, as your template here http://asp.syncfusion.com/demos/reporting/DocIO/Mail%20Merge/NestedMailMerge/CS/NestedMailMerge.aspx

For some orders, all informations are not given. In this case, I don't want to display the label if there is no data (ie, remove the line "Shipped Date" if there is no shipped date for this order).

Some employees don't have orders. In this case, I want to report employee's informations without displaying an empty block "Order" 
(ie                    Order No Number
                        Order Date : empty
                        Shipped Date : empty
                        Required Date : empty).

I think I have to use MergeField event. But I don't know how to proceed.

Thank for your help and information.

TL





Vijay Ramachandran [Syncfusion]
Replied On June 26, 2017 06:25 AM UTC

Hi lalleman,

Thank you for contacting Syncfusion support.

Yes, you can remove the merge field label text (text before/After the merge field) when the field value is empty using Merge field event. We have prepared sample to remove the label text by removing the owner paragraph of merge field when the field value is empty. You can download the sample from here and let us know if it helps.

Note: We have used Execute() method in this sample and this event is common to ExecuteGroup(), ExecuteNestedGroup() methods.

Let us know if you have any concern.

Regards,
Vijay R
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;