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. Image for the cookie policy date

DocIO Mailmerge if statement

Is it possible to use DocIO Mailmerge to hide a table if there is no data?

Currently, I have a word template as below.

«BeginGroup:Invoice»

 

Col1

Col2

Col3

Col4

Col5

Col6

Col7

Col8

«TableStart:Datas»«Code» «Description»

«Units»  

«Uom»

«PayRate»

«Factor»

«Amount»

«Start»

«Finish»«TableEnd:Datas»

«EndGroup:Invoice»

I would like to hide the table title if the Datas template table is empty.


1 Reply

SY Sethumanikkam Yogendran Syncfusion Team September 1, 2016 12:59 PM UTC

Hi Customer,

Thank you for contacting Syncfusion support.

Is it possible to use DocIO Mail merge to hide a table if there is no data?
Yes, but DocIO does not have any direct public API to hide table when there is no data while performing Mail merge. Alternatively, we have prepared a sample to achieve your requirement by iterating TableStart from Merge field collections and removing relevant table while performing Mail merge using DocIO.

Please find the Mail merge sample from below link.
http://www.syncfusion.com/downloads/support/forum/125663/ze/MailMergeDocIO_Application1152988637.zip

If we misunderstood your requirement, kindly update us requirement with clear description. Thereby we will analyze further on the mentioned requirement and update you with appropriate solution.

Please let us know if you have any further questions.

Thanks,
Sethumanikkam.Y
 


Loader.
Live Chat Icon For mobile
Up arrow icon