Calculated fields in Mail Merge

Hi,

I'm trying to create a word document for quotations with a header and a body with quotation lines. Every line has a Quantity and Price and I want to add a field with the Total (Quantity * Price).

My lines in the word document are like these:

{MERGEFIELD BeginGroup:QuotationLines}
{MERGEFIELD Units} {MERGEFIELD Price} { = {{MERGEFIELD Units} * {MERGEFIELD Price}} }
{MERGEFIELD EndGroup:QuotationLines}

But the calculated field doesn't appear filled (it's blank).

Do you know any solution to add a calculated field?
Regards
Jose


3 Replies

GT Gunasekaran T Syncfusion Team September 9, 2010 11:54 AM UTC

Hi Jose,

Thank you for using Syncfusion products.

Currently DocIO does not have the support for updating the fields. We can overcome this, by updating the fields in the generated document using MS Word (Right click on the field and select Update Field).

Use the following field codes for Merge fields in the template document:
{MERGEFIELD BeginGroup:QuotationLines \* MERGEFORMAT}{MERGEFIELD ProductName \*MERGEFORMAT}
{MERGEFIELD Units \* MERGEFORMAT}
{MERGEFIELD Price \* MERGEFORMAT}
{= {MERGEFIELD Units \* MERGEFORMAT}*{MERGEFIELD Price \* MERGEFORMAT}}{MERGEFIELD EndGroup:QuotationLines \* MERGEFORMAT}

We have created a sample application to illustrate your requirement to add formula with merge fields (Units * Price).

Please do find the sample and screen shot to update the fields using MS Word in the attachment.

We faced an issue in updating the fields using MS Word in the generated Word 97-2003 (Doc) Format whereas it works perfectly in Docx format document. We suspect this could be a defect. We have forwarded this issue to our development team for further analysis. Could you please report this issue through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents ), because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well?

Please let us know if you have any queries.

Regards,
Gunasekaran




SampleAndScreenshots_60ed246d.zip


JL Jose L. Garcia September 10, 2010 06:04 PM UTC

Hi,

This is perfect.
Thanks a lot for your invaluable help.

Regards
Jose



GT Gunasekaran T Syncfusion Team September 13, 2010 05:37 AM UTC

Hi Jose,

Thank you for your response.

Please get in touch with us, if you require any further assistance.

Regards,
Gunasekaran



Loader.
Up arrow icon