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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Table mergefield between xero templates and syncfusion templates

Thread ID:

Created:

Updated:

Platform:

Replies:

125669 Sep 1,2016 09:54 AM UTC Sep 6,2016 12:25 PM UTC ASP.NET MVC 5
loading
Tags: DocIO
ov
Asked On September 1, 2016 09:54 AM UTC


With Syncfusion DocIO libraries, is it possible to use 

«TableStart:group» and «TableEnd:group» 
without being inside the

«BeginGroup:group» and «EndGroup:EmployeePayslip» ?

This is because BeginGroup assumes we are dealing with array of objects but currently 

we always have just a single Payslip object but the properties of the object can be an array like below.

Payslip {

       Payments = new List<Payment>,

        Deductions= new List<Deductions>

}

I have attached xero template for reference.


Attachment: xero_invoice_template_364af29c.zip

Sethumanikkam Yogendran [Syncfusion]
Replied On September 2, 2016 07:21 AM UTC

Hi Customer,

Thank you for contacting Syncfusion support.

We have prepared a sample to meet your requirement. In this sample, we have performed Mail merge with creating an instance of “MailMergeDataTable” by specifying mail merge group name and “IEnumerable” collection with the table start group which doesn’t being inside the begin group.

Please find the sample from below link.
http://www.syncfusion.com/downloads/support/forum/125669/ze/MailMergeDocIO_Application-199658507.zip

Please refer the below link to know more about how to perform Mail merge using DocIO with objects.
https://help.syncfusion.com/file-formats/docio/working-with-mailmerge#performing-mail-merge-with-business-objects

If we misunderstood your requirement, kindly update us with clear description. Kindly modify the attached sample or existing sample of yours and provide us to proceed further to update you with appropriate solution.

Please let us know if you have any other questions.

Thanks,
Sethumanikkam.Y
 


ov
Replied On September 2, 2016 08:05 AM UTC

Probably I haven't explained well and also I forgot to mention I need to use nested group ExecuteNestedGroup.
Currently we always have one LineItem but its properties can be an array like (payments) (New property added below).
The Payments property will be a table. Is it still possible without BeginGroup/EndGroup field?

I like to achieve the following with the LineItem class definition.

    /// <summary>
    /// Class for LineItem TableGroup
    /// </summary>
    public class LineItem
    {
        public string Description { get; set; }
        public string Quantity { get; set; }
        public string UnitAmount { get; set; }
        public string TaxPercentageOrName { get; set; }
        public string LineAmount { get; set; }
        // new property
        public List<string> Payments {get; set}
        public LineItem(string description, string quantity, string unitAmount, string taxPercentageOrName, string lineAmount)
        {
            Description = description;
            Quantity = quantity;
            UnitAmount = unitAmount;
            TaxPercentageOrName = taxPercentageOrName;
            LineAmount = lineAmount;
        }
    }

Is it still possible to use 

Pradeep Loganathan [Syncfusion]
Replied On September 5, 2016 09:08 AM UTC

Hi Customer,

Thanks for your query.

It is not possible to do the ExecuteNestedGroup without BeginGoup/EndGroup field. Please refer the below link to know more about ExecuteNestedGroup.

https://help.syncfusion.com/file-formats/docio/working-with-mailmerge#performing-nested-mail-merge-for-group

Please let us know if you have any other questions.

Best Regards,
Pradeep L
 


ov
Replied On September 6, 2016 01:13 AM UTC

In my first post I have also attached the Xero's template.

In the template, you can see that they can use 
<TableStart:LineItem> and </TableEnd:LineItem> without being inside the Begin/EndGroup

Do you know how they achieve that? They might also be using a third party libraries too.

I have attached again for reference.

Attachment: xero_invoice_template_70045e71.zip

Vijay Ramachandran [Syncfusion]
Replied On September 6, 2016 12:25 PM UTC

Hi Customer,

Thank you for your update.

Please find the difference between the ExecuteGroup() and ExecuteNestedGroup() methods from following table:

 
Method Name 
Template 
Result will be 
 
 
 
 
 
  
  
 
 
 
 
 
 
 
 
  
  
 
As mentioned earlier you couldn’t do the ExecuteNestedGroup operation without using the BeginGroup\EndGroup because ExecuteNestedGroup method used to perform the mail merge operation between multiple groups. Each group must start with BeginGroup:groupName and end with EndGroup:groupName to identify the different groups. If you want to do the MailMerge operation between multiple groups means you may use ExecuteNestedGroup method otherwise, you can use ExecuteGroup method. This method performs the mail merge operation within single group with multiple records.

We have prepared the sample to illustrate the same, please find the sample from following link:
http://www.syncfusion.com/downloads/support/forum/125669/ze/GenerateWord_Windows-2095097419.zip

For more details please refer the following UG link:
https://help.syncfusion.com/file-formats/docio/working-with-mailmerge#performing-nested-mail-merge-with-relational-data-objects

So kindly use any of one method ExecuteGroup() or ExecuteNestedGroup() as per your current requirement.

If you are facing any problem while achieving your requirement by using these methods then kindly provide us your expected result document (after performing mail merge operations), so that we could analyse further on your exact requirement and provide you the proper solution at the earliest.

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

;