Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

0
Votes

Provide support to execute mail merge with commands contains AND and OR operators

Please find the example code below:

                    //Creates an instance of the MailMergeDataSet.

                    MailMergeDataSet dataSet = new MailMergeDataSet();

                    //Creates the mail merge data table in order to perform mail merge.

                    MailMergeDataTable dataTable = new MailMergeDataTable("Customers", GetCustomers());

                    dataSet.Add(dataTable);

                    dataTable = new MailMergeDataTable("Orders", GetOrders());

                    dataSet.Add(dataTable);

                    List<DictionaryEntry> commands = new List<DictionaryEntry>();

                    //DictionaryEntry contain "Source table" (key) and "Command" (value).

                    DictionaryEntry entry = new DictionaryEntry("Customers", string.Empty);

                    commands.Add(entry);

                    //Retrieves the customer details.

                    entry = new DictionaryEntry("Orders", "CustomerID = %Customers.CustomerID% AND OrderName = %Customers.CompanyName%");

                    commands.Add(entry);

                    //Performs the mail merge operation with the dynamic collection.

                    document.MailMerge.ExecuteNestedGroup(dataSet, commands);



Note: You can track this feedback for both .NET Framework , .NET Core (cross platform) and latest target.