Merged codes inserted into a mapped rich text control not merging

Good morning

I have a template letter that merges for multiple recipients ie same content, and to assist users who then edit the document after merging, so they only need to edit once. We have inserted a rich text control with all the content and then mapped it. However once mapped and then inserted into the document from the mapped part, the merge codes no longer merge. If we insert a rich text content control from the Developers menu item, it merges fine. But after being mapped, it fails to merge.

Steps to replicate:

  1. Create an .xml file with tags/fields required in our case, we just needed

  2. Open your template

  3. Go to Developer menu

  4. Select XML mapping pane

  5. In the dropdown, select to add a new part

  6. Save your template

  7. Go to Developer menu

  8. Select XML mapping pane

  9. In the dropdown, select the part that you added with the required fields

  10. Right click the new field and select Insert content control. A sub menu will show to allow you to choose what type of control ie plain text, date etc, select Rich Text

  11. Copy content and merge codes and paste into the Rich Text Control

Save and merge and note that aspose merge codes do not merge

If I Went to the Developer tab, inserted a Rich Text Control and then pasted the content and merge codes, it merges fine.

Can anyone advise?

@EMP Could you please attach your sample template, the code that will allow us to reproduce the problem, the current and expected output documents here for our reference? We will check the issue and provide you more information.

Hi

The zip file has the xml file as well as the template we mapped it to.

In the template the first merge code is in the document. Then there are 2 content controls with the same merge code. The first Content control has been inserted from the Developers Menu|Rich Text on the Controls group. The 2nd has been inserted by clicking xml mapping on the developer menu, and selecting Deed under Custom XML parts on the XML mapping pane, right clicking Body, selecting Insert Content Control|Rich Text

We then pasted the merge code into each control.

The code in the document and in the first content control merges fine. The 2nd content control, does not merge.

Template.zip (24.9 KB)

This is the output document with the current result. The expected output is that all fields should merge - as the first 2.

Template Output.docx (36.9 KB)

Let me know if you need anything further.

@EMP Thank you for additional information. We will check the issue and provide you more information.
It would be also handy if you provide you sample data source you use to build the report using LINQ Reporting Engine and your code, so we can test your exact scenario.

Hi

The developer says getting the sample data and code is not easy. While I am waiting for them, is there any way of testing this without these requirements?

Kind regards
Esther

@EMP I have tested the scenario with dummy data and cannot reproduce the problem on my side. Here is the code:

public class PrecedentMerger
{
    public List<Matter> Matter = new List<Matter>();
}
public class Matter
{
    public string in_client;
}
PrecedentMerger merger = new PrecedentMerger();
merger.Matter.Add(new Matter() { in_client = "RAMS WESTPAC" });

Document doc = new Document(@"C:\Temp\in.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, merger, "PrecedentMerger");
doc.Save(@"C:\Temp\out.docx");

Here is the produced output: out.docx (33.7 KB)

@alexey.noskov thank you for the quick response. I have sent this to our developer. But I suspect we may need further assistance and I am trying to get the sample data source and code.

Kind regards
Esther

@EMP Sure, we will wait for the sample data source and code from your side.

Hi @alexey.noskov

This is what I received from the developer

public void ProcessAsposeFormat(string fileName, DataRow matterRow, DataRow matterContactRow)
{
    try
    {

        //// Cancel BackgroundWorker
        //if (!bgUpdateDataSet.IsBusy)
        //    bgUpdateDataSet.CancelAsync();
        Common.Log.Trace("Start Aspose document formatting");
        Aspose.Words.License license = new Aspose.Words.License();
        license.SetLicense("Conholdate.Total.NET.lic");
        Common.Log.Trace("ProcessAsposeFormat 1 " + DateTime.Now.ToString());
        Document AposeDoc = new Document(fileName);
        Common.Log.Trace("ProcessAsposeFormat Started processing " + DateTime.Now.ToString());
        ReportingEngine engine = new ReportingEngine(); // Execute the build report.
        engine.Options |= ReportBuildOptions.InlineErrorMessages
            | ReportBuildOptions.RemoveEmptyParagraphs;

        //DataSet dataSet = new DataSet();
        string matContID = string.Empty;
        //Get only the relevent Data Se
        DataSet dataSet = new DataSet("PrecedentMerger");
        if (matterContactRow != null)
            matContID = Convert.ToString(matterContactRow[CommonTools.Settings.MatterContactIdentifierColumn]);
        dataSet = GetSPDataSet(selectedMatterID, matContID);
        dataSet.DataSetName = "PrecedentMerger";

        Common.Log.Trace("ProcessAsposeFormat selected Dataset name is {0} and table count is {1}   " +
                DateTime.Now.ToString(), dataSet.DataSetName, dataSet.Tables.Count);

        if (engine.BuildReport(AposeDoc, dataSet, dataSet.DataSetName))
        {
            AposeDoc = AskFieldWizard(AposeDoc, fileName, matterRow, matterContactRow);

            if (CommonTools.Settings.AsposeMemoryOptimisation)
            {
                if (System.IO.Path.GetExtension(fileName).ToLower() == "doc")
                {
                    Aspose.Words.Saving.DocSaveOptions options = new Aspose.Words.Saving.DocSaveOptions(SaveFormat.Doc);
                    options.MemoryOptimization = true;
                    // Successfully built the report.
                    AposeDoc.Save(fileName, options);
                }
                else
                {
                    Aspose.Words.Saving.OoxmlSaveOptions options = new Aspose.Words.Saving.OoxmlSaveOptions(SaveFormat.Docx);
                    options.MemoryOptimization = true;
                    // Successfully built the report.
                    AposeDoc.Save(fileName, options);
                }
            }
            else
                // Successfully built the report.
                AposeDoc.Save(fileName);
        }
        else
        {
            AposeDoc = AskFieldWizard(AposeDoc, fileName, matterRow, matterContactRow);

            // Do something with a report containing a template syntax error.
            Common.Log.Trace("Aspose Document Syntax Error");
            if (CommonTools.Settings.AsposeErrorLogInline)
            {
                if (System.IO.Path.GetExtension(fileName).ToLower() == "doc")
                {
                    Aspose.Words.Saving.DocSaveOptions options = new Aspose.Words.Saving.DocSaveOptions(SaveFormat.Doc);
                    options.MemoryOptimization = true;
                    // Successfully built the report.
                    AposeDoc.Save(fileName, options);
                }
                else
                {
                    Aspose.Words.Saving.OoxmlSaveOptions options = new Aspose.Words.Saving.OoxmlSaveOptions(SaveFormat.Docx);
                    options.MemoryOptimization = true;
                    // Successfully built the report.
                    AposeDoc.Save(fileName, options);
                }
            }
            else
                // Successfully built the report.
                AposeDoc.Save(fileName);
        }

        Common.Log.Trace("ProcessAsposeFormat End processing " + DateTime.Now.ToString());
        Common.Log.Trace("End Aspose document formatting");
    }
    catch (Exception ex)
    {
        Common.Log.Error("Exception occurred. " + ex.HResult + " :: " + ex.Message);
    }
}





private DataSet GetSPDataSet(string matterID, string matterContactID)
{
    Common.Log.Trace("GetSPDataSet Start: " + DateTime.Now.ToString());
    DataSet dataSet = null;

    try
    {
        //Get DataSet from DB
        dataSet = PMData.GetMatterDataSet(matterID, matterContactID);

        dataSet.Tables[0].TableName = "Matter";
        dataSet.Tables[1].TableName = "MatterContact";

        //Update Tables and Add Relationships onto the DataSet
        int tableCount = 2;
        int totalDtCount = CommonTools.Settings.GetDataTableNodeCount();

        if (dataSet.Tables.Count != (totalDtCount + tableCount))
            throw new Exception("The stored procedure and the configuration doesn't match. Please contact administrator.");

        Settings.DatatableNode datatableNode = new Settings.DatatableNode();
        if (CommonTools.Settings.GetNode(@"ApplicationSettings/DataConnector/ExtendedDataSet") != null)
        {
            int nodeCount = CommonTools.Settings.GetDataTableNodeCount();
            for (int i = 1; i <= nodeCount; i++)
            {
                tableCount++;
                datatableNode = CommonTools.Settings.GetDataTableNodes(i);

                if (string.IsNullOrEmpty(datatableNode.DataTableName))
                    continue;

                Common.Log.Trace("DataTableName :" + datatableNode.DataTableName);
                dataSet.Tables[tableCount - 1].TableName = datatableNode.DataTableName;
                if (datatableNode.DataTableType.ToLower() == "matter")
                {
                    dataSet.Relations.Add(string.Concat("MatterRel", i),
                    dataSet.Tables["Matter"].Columns[CommonTools.Settings.MatterIdentifierColumn],
                    dataSet.Tables[datatableNode.DataTableName].Columns[CommonTools.Settings.MatterIdentifierColumn]);
                }
                else if (datatableNode.DataTableType.ToLower() == "mattercontact")
                {
                    dataSet.Relations.Add(string.Concat("MatterContactRel", i),
                    dataSet.Tables["MatterContact"].Columns[CommonTools.Settings.MatterContactIdentifierColumn],
                    dataSet.Tables[datatableNode.DataTableName].Columns[CommonTools.Settings.MatterContactIdentifierColumn]);
                }
                if (!string.IsNullOrEmpty(datatableNode.DataTableParent))
                {
                    dataSet.Relations.Add(string.Concat("DataTableRel", i),
                    dataSet.Tables[datatableNode.DataTableParent].Columns[datatableNode.DataTableParentID],
                    dataSet.Tables[datatableNode.DataTableName].Columns[datatableNode.DataTableParentID]);
                }
            }
        }
    }
    catch (Exception ex)
    {
        Common.Log.Error("GetSPDataSet Error: " + ex.ToString());
    }
    Common.Log.Trace("GetSPDataSet End: " + DateTime.Now.ToString());
    return dataSet;
}

Hopefully you will be able to tell us what we are doing differently.

Kind regards
Esther

@EMP Thank you for additional information. Unfortunately, the code does not allow to get the data used for building the report. Could you please save the DataSet used to build the report to XML and attach this XML here for testing. We will recreate DataSet from the XML and use it to test the scenario.
Alternatively, please create a simple console application that will allow us to reproduce the problem on our side.

Hi @alexey.noskov

My developer has been able to provide me with a dataset. Hope this is helpful.

I could not see how to attach the file, so I have pasted the xml here. Let me know if you need the file.

Kind regards
Esther

<NewDataSet>
	<Matter>
		<ch_file_number>5001598</ch_file_number>
		<File_Number>5001598-2</File_Number>
		<Managing_Agent>NULL</Managing_Agent>
		<in_id>469747-1</in_id>
		<in_file_number>5001598</in_file_number>
		<in_instruction_date>2021-12-01T17:03:19+11:00</in_instruction_date>
		<in_client>RAMS WESTPAC</in_client>
		<in_hbn_no>NULL</in_hbn_no>
		<in_account_id>NULL</in_account_id>
		<in_source_code>NULL</in_source_code>
		<in_status>Submitted</in_status>
		<in_purpose_of_instruction>Issue Notices</in_purpose_of_instruction>
		<in_group_name>NULL</in_group_name>
		<in_invoice>NULL</in_invoice>
		<in_lender>NULL</in_lender>
		<in_is_current_precedent_data>1</in_is_current_precedent_data>
		<in_judgement_debt_amount>NULL</in_judgement_debt_amount>
		<in_court_name>3</in_court_name>
		<in_court_division>NULL</in_court_division>
		<in_court_case_no_ref>NULL</in_court_case_no_ref>
		<co_full_name>NULL</co_full_name>
		<co_short_name>NULL</co_short_name>
		<co_registry>NULL</co_registry>
		<co_email>NULL</co_email>
		<co_phone>NULL</co_phone>
		<court_street_address_property_building_name>NULL</court_street_address_property_building_name>
		<court_street_address_unit_level_shop_no>NULL</court_street_address_unit_level_shop_no>
		<court_street_address_street_no>NULL</court_street_address_street_no>
		<court_street_address_street_name>NULL</court_street_address_street_name>
		<court_street_address_suburb>NULL</court_street_address_suburb>
		<court_street_address_state>NULL</court_street_address_state>
		<court_street_address_postcode>NULL</court_street_address_postcode>
		<court_pobox_address_post_office_box_no>NULL</court_pobox_address_post_office_box_no>
		<court_pobox_address_suburb>NULL</court_pobox_address_suburb>
		<court_pobox_address_state>NULL</court_pobox_address_state>
		<court_pobox_address_postcode>NULL</court_pobox_address_postcode>
		<cl_alt_matter_type_client_name>Westpac</cl_alt_matter_type_client_name>
		<cl_full_name>Westpac Banking Corporation Limited</cl_full_name>
		<cl_name>RAMS WESTPAC</cl_name>
		<cl_type>Client and Lender</cl_type>
		<cl_acn>007 457 141</cl_acn>
		<cl_abn>33 007 457 141</cl_abn>
		<cl_credit_licence_number>233714</cl_credit_licence_number>
		<client_office_address_street_no>7</client_office_address_street_no>
		<client_office_address_street_name>Laffer Drive</client_office_address_street_name>
		<client_office_address_suburb>Bedford Park</client_office_address_suburb>
		<client_office_address_state>SA</client_office_address_state>
		<client_office_address_postcode>5042</client_office_address_postcode>
		<client_pobox_post_office_box_no>NULL</client_pobox_post_office_box_no>
		<client_pobox_address_suburb>NULL</client_pobox_address_suburb>
		<client_pobox_address_state>NULL</client_pobox_address_state>
		<client_pobox_address_Postcode>NULL</client_pobox_address_Postcode>
		<client_street_address_street_no>275</client_street_address_street_no>
		<client_street_address_street_name>Kent Street</client_street_address_street_name>
		<client_street_address_suburb>Sydney</client_street_address_suburb>
		<client_street_address_state>NSW</client_street_address_state>
		<client_street_address_postcode>2000</client_street_address_postcode>
	</Matter>
	<MatterContact>
		<is_id>118941</is_id>
		<File_Number>5001598-2</File_Number>
		<spid>68</spid>
		<spl_id>68</spl_id>
		<is_id1>118941</is_id1>
		<ip_id>180145</ip_id>
		<in_id>469747-1</in_id>
		<ip_date_of_birth>NULL</ip_date_of_birth>
		<ip_party_type>Company</ip_party_type>
		<ip_party_no>1</ip_party_no>
		<ip_relationship_int>Borrower/Mortgagor</ip_relationship_int>
		<ip_company_name>ABC Company Limited</ip_company_name>
		<ip_acn>NULL</ip_acn>
		<ip_trust_name>NULL</ip_trust_name>
		<ip_company_bus_tel_no>NULL</ip_company_bus_tel_no>
		<ip_first_name>Borrower Mortgagor</ip_first_name>
		<ip_surname>One</ip_surname>
		<ip_property_or_building_name>NULL</ip_property_or_building_name>
		<ip_floor_no>NULL</ip_floor_no>
		<ip_unit_level_shop_no>1</ip_unit_level_shop_no>
		<ip_street_name>First Street</ip_street_name>
		<ip_suburb>Firsttown</ip_suburb>
		<ip_state>NSW</ip_state>
		<ip_postcode>2000</ip_postcode>
		<ip_home_tel_no>NULL</ip_home_tel_no>
		<ip_bus_tel_no>NULL</ip_bus_tel_no>
		<ip_mobile_no>NULL</ip_mobile_no>
		<ip_post_office_box_no>NULL</ip_post_office_box_no>
		<ip_postal_suburb>NULL</ip_postal_suburb>
		<ip_postal_state>NULL</ip_postal_state>
		<ip_postal_postcode>NULL</ip_postal_postcode>
		<ip_email_address>someone@somewhere.com</ip_email_address>
		<ip_authorised_third_parties_name>NULL</ip_authorised_third_parties_name>
		<ip_is_deceased>NULL</ip_is_deceased>
		<ip_country country="">NULL</ip_country>
		<ip_postal_country>NULL</ip_postal_country>
		<ip_sensitive_party>NULL</ip_sensitive_party>
		<ip_sensitive_party_comment>NULL</ip_sensitive_party_comment>
		<ip_date_of_hardship_request>NULL</ip_date_of_hardship_request>
		<ip_date_exited_hardship>NULL</ip_date_exited_hardship>
		<ip_hardship_reason>NULL</ip_hardship_reason>
		<ip_is_party_bankrupt>0</ip_is_party_bankrupt>
		<ip_is_company_registered>0</ip_is_company_registered>
		<ip_company_status>NULL</ip_company_status>
	</MatterContact>
	<SecParties>
		<is_id>118941</is_id>
		<File_Number>5001598-2</File_Number>
		<spid>68</spid>
		<spl_id>68</spl_id>
		<is_id1>118941</is_id1>
		<ip_id>180145</ip_id>
		<in_id>469747-1</in_id>
		<ip_date_of_birth>NULL</ip_date_of_birth>
		<ip_party_type>Company</ip_party_type>
		<ip_party_no>1</ip_party_no>
		<ip_relationship_int>Borrower/Mortgagor</ip_relationship_int>
		<ip_company_name>ABC Company Limited</ip_company_name>
		<ip_acn>NULL</ip_acn>
		<ip_trust_name>NULL</ip_trust_name>
		<ip_company_bus_tel_no>NULL</ip_company_bus_tel_no>
		<ip_first_name>Borrower Mortgagor</ip_first_name>
		<ip_surname>One</ip_surname>
		<ip_property_or_building_name>NULL</ip_property_or_building_name>
		<ip_floor_no>NULL</ip_floor_no>
		<ip_unit_level_shop_no>1</ip_unit_level_shop_no>
		<ip_street_name>First Street</ip_street_name>
		<ip_suburb>Firsttown</ip_suburb>
		<ip_state>NSW</ip_state>
		<ip_postcode>2000</ip_postcode>
		<ip_home_tel_no>NULL</ip_home_tel_no>
		<ip_bus_tel_no>NULL</ip_bus_tel_no>
		<ip_mobile_no>NULL</ip_mobile_no>
		<ip_post_office_box_no>NULL</ip_post_office_box_no>
		<ip_postal_suburb>NULL</ip_postal_suburb>
		<ip_postal_state>NULL</ip_postal_state>
		<ip_postal_postcode>NULL</ip_postal_postcode>
		<ip_email_address>someone@somewhere.com</ip_email_address>
		<ip_authorised_third_parties_name>NULL</ip_authorised_third_parties_name>
		<ip_is_deceased>NULL</ip_is_deceased>
		<ip_country>NULL</ip_country>
		<ip_postal_country>NULL</ip_postal_country>
		<ip_sensitive_party>NULL</ip_sensitive_party>
		<ip_sensitive_party_comment>NULL</ip_sensitive_party_comment>
		<ip_date_of_hardship_request>NULL</ip_date_of_hardship_request>
		<ip_date_exited_hardship>NULL</ip_date_exited_hardship>
		<ip_hardship_reason>NULL</ip_hardship_reason>
		<ip_is_party_bankrupt>0</ip_is_party_bankrupt>
		<ip_is_company_registered>0</ip_is_company_registered>
		<ip_company_status>NULL</ip_company_status>
	</SecParties>
	<SecParties>
		<is_id>118942</is_id>
		<File_Number>5001598-2</File_Number>
		<spid>70</spid>
		<spl_id>70</spl_id>
		<is_id1>118942</is_id1>
		<ip_id>185006</ip_id>
		<in_id>469747-1</in_id>
		<ip_date_of_birth>NULL</ip_date_of_birth>
		<ip_party_type>Mrs</ip_party_type>
		<ip_party_no>3</ip_party_no>
		<ip_relationship_int>Guarantor/Mortgagor</ip_relationship_int>
		<ip_company_name>NULL</ip_company_name>
		<ip_acn>NULL</ip_acn>
		<ip_trust_name>NULL</ip_trust_name>
		<ip_company_bus_tel_no>NULL</ip_company_bus_tel_no>
		<ip_first_name>Mary</ip_first_name>
		<ip_surname>Christmas</ip_surname>
		<ip_property_or_building_name>NULL</ip_property_or_building_name>
		<ip_floor_no>NULL</ip_floor_no>
		<ip_street_no>3</ip_street_no>
		<ip_street_name>Third Street</ip_street_name>
		<ip_suburb>Thirdville</ip_suburb>
		<ip_state>NSW</ip_state>
		<ip_postcode>2344</ip_postcode>
		<ip_home_tel_no>NULL</ip_home_tel_no>
		<ip_bus_tel_no>NULL</ip_bus_tel_no>
		<ip_mobile_no>NULL</ip_mobile_no>
		<ip_post_office_box_no>NULL</ip_post_office_box_no>
		<ip_postal_suburb>NULL</ip_postal_suburb>
		<ip_postal_state>NULL</ip_postal_state>
		<ip_postal_postcode>NULL</ip_postal_postcode>
		<ip_email_address>someoneelse@somewhere.com</ip_email_address>
		<ip_authorised_third_parties_name>NULL</ip_authorised_third_parties_name>
		<ip_is_deceased>NULL</ip_is_deceased>
		<ip_country>NULL</ip_country>
		<ip_postal_country>NULL</ip_postal_country>
		<ip_sensitive_party>NULL</ip_sensitive_party>
		<ip_sensitive_party_comment>NULL</ip_sensitive_party_comment>
		<ip_date_of_hardship_request>NULL</ip_date_of_hardship_request>
		<ip_date_exited_hardship>NULL</ip_date_exited_hardship>
		<ip_hardship_reason>NULL</ip_hardship_reason>
		<ip_is_party_bankrupt>0</ip_is_party_bankrupt>
		<ip_is_company_registered>0</ip_is_company_registered>
		<ip_company_status>NULL</ip_company_status>
	</SecParties>
	<Securities>
		<is_id>118941</is_id>
		<ip_id>180145</ip_id>
		<in_id>469747-1</in_id>
		<is_security_no>1</is_security_no>
		<is_unit_level_shop_no>11</is_unit_level_shop_no>
		<is_street_no>11A</is_street_no>
		<is_street_name>First Road</is_street_name>
		<is_suburb>Suburb</is_suburb>
		<is_state>NSW</is_state>
		<is_postcode>2013</is_postcode>
		<is_title_reference>90225 istitlereference</is_title_reference>
		<is_acc_secured>4716098</is_acc_secured>
		<is_date_of_valuation>NULL</is_date_of_valuation>
		<is_date_of_mortgage>NULL</is_date_of_mortgage>
		<is_no_of_mortgagors>0</is_no_of_mortgagors>
		<is_mortgagor_name>NULL</is_mortgagor_name>
		<is_date_notice_vacate_tenant>NULL</is_date_notice_vacate_tenant>
		<is_date_notice_vacate_tenant_served>NULL</is_date_notice_vacate_tenant_served>
		<is_date_notice_vacate_tenant_expires>NULL</is_date_notice_vacate_tenant_expires>
		<is_date_writ_filed>NULL</is_date_writ_filed>
		<is_date_notice_vacate_issued_sheriff>NULL</is_date_notice_vacate_issued_sheriff>
		<is_date_eviction_scheduled>NULL</is_date_eviction_scheduled>
		<is_date_evicted>NULL</is_date_evicted>
		<is_date_security_packet_request>NULL</is_date_security_packet_request>
		<is_date_security_packet_receive>NULL</is_date_security_packet_receive>
		<is_date_anticipated_dm>NULL</is_date_anticipated_dm>
		<is_payout>NULL</is_payout>
		<is_date_of_discharge>NULL</is_date_of_discharge>
	</Securities>
	<Securities>
		<is_id>118942</is_id>
		<ip_id>180145</ip_id>
		<in_id>469747-1</in_id>
		<is_security_no>2</is_security_no>
		<is_unit_level_shop_no>2</is_unit_level_shop_no>
		<is_street_no>22A</is_street_no>
		<is_street_name>Second Street</is_street_name>
		<is_suburb>Secondtown</is_suburb>
		<is_state>NSW</is_state>
		<is_postcode>2222</is_postcode>
		<is_title_reference>90226 istitlereference</is_title_reference>
		<is_acc_secured>4716098</is_acc_secured>
		<is_date_of_valuation>NULL</is_date_of_valuation>
		<is_date_of_mortgage>NULL</is_date_of_mortgage>
		<is_no_of_mortgagors>0</is_no_of_mortgagors>
		<is_mortgagor_name>NULL</is_mortgagor_name>
		<is_date_notice_vacate_tenant>NULL</is_date_notice_vacate_tenant>
		<is_date_notice_vacate_tenant_served>NULL</is_date_notice_vacate_tenant_served>
		<is_date_notice_vacate_tenant_expires>NULL</is_date_notice_vacate_tenant_expires>
		<is_date_writ_filed>NULL</is_date_writ_filed>
		<is_date_notice_vacate_issued_sheriff>NULL</is_date_notice_vacate_issued_sheriff>
		<is_date_eviction_scheduled>NULL</is_date_eviction_scheduled>
		<is_date_evicted>NULL</is_date_evicted>
		<is_date_security_packet_request>NULL</is_date_security_packet_request>
		<is_date_security_packet_receive>NULL</is_date_security_packet_receive>
		<is_date_anticipated_dm>NULL</is_date_anticipated_dm>
		<is_payout>NULL</is_payout>
		<is_date_of_discharge>NULL</is_date_of_discharge>
	</Securities>
</NewDataSet>

@EMP Thank you for additional information. Unfortunately, the problem is still not reproducible on my side. I have used the provided data and template for testing. Here is testing code:

XmlDataSource ds = new XmlDataSource(@"C:\Temp\data.xml");
Document doc = new Document(@"C:\Temp\in.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, ds, "PrecedentMerger");
doc.Save(@"C:\Temp\out.docx");

Here is the produced output: out.docx (33.7 KB)

As you can see all placeholders are properly filled with data from data source.

Hi, the issue happens when the document contains xmlbound rich text content control. normal rich text control work just fine.

@archanarc Could you please attach the template, data and code or create a simple console application that will allow us to reproduce the problem? We will recheck the issue and provide you more information.

Thanks @alexey.noskov .

Code looks like

string fileName = @"C:\temp\Aspose\Template.docx";
string xmlfile = string.Empty;
//Process for aspose
DataSet ds = new DataSet();
if (fileName != string.Empty)
{
    xmlfile = Path.Combine(@"C:\temp\Aspose\Dataset.xml");
    if (File.Exists(xmlfile))
    {

        ds.ReadXml(xmlfile);

    }

    Aspose.Words.License license = new Aspose.Words.License();
    license.SetLicense("Conholdate.Total.NET.lic");
    Aspose.Words.Document AposeDoc = new Aspose.Words.Document(fileName);
    ReportingEngine engine = new ReportingEngine(); // Execute the build report.
    engine.Options |= ReportBuildOptions.InlineErrorMessages
        | ReportBuildOptions.RemoveEmptyParagraphs;

    if (engine.BuildReport(AposeDoc, ds, ds.DataSetName))
    {
        // Successfully built the report.
        AposeDoc.Save(fileName);
    }
    else
    {
        MessageBox.Show("Error in Aspose formatting");
        // Successfully built the report.
        AposeDoc.Save(fileName);
    }

Documents are attached here. Please see the difference in output file
Aspose.zip (49.2 KB)

Please let me know what went wrong. Also note that its working for normal rich text content control, the issue is with only xmlbound rich text content control

@archanarc Thank you for additional information. As I can see Template.docx does not have any reporting syntax and after executing your code the output looks exactly as input document.

There is reporting syntax in the attached Output.docx. If I use this document as input the reporting syntax is properly replaced with data. So unfortunately, I still cannot reproduce the problem on my side.

Could you please make sure you have attached the right input document? Also if possible please create a simple console application with all required resource that will allow us to reproduce the problem.

Apologies, Adding the proper file. I tried to create a console application however I am getting different errors in adding the license. So this is the same code I used.

I believe you can reproduce this issue if your file has a richtext xml bound content control. Pleaase test with this and let me know.

Input.zip (25.0 KB)

@archanarc Thank you for additional information. Unfortunately, the problem is still not reproducible on my side. Here is the output produced on my side using the above provided code and template: out.docx (33.7 KB)

Since I am not the owner of this thread I am not able to see the document. However its definitely not working at our end. please see a recording in this link and let me know how you think. Thanks!

@archanarc Thank you for additional information. Unfortunately the link is no accessible.
As I can see you are using an old 22.3 version of Aspose.Words. Please try using the latest 24.5 version of let us know if the problem still persists.