Saved document with mail merge data source throws error on load


https://www.nevron.com/Forum/Topic12876.aspx
Print Topic | Close Window

By Mike Willis - 5 Years Ago
Product Type [OpenVision]
Edition Type [Enterprise]

1. Create a new document
2  Add mail merge datasource (see code below)
3 insert a couple of fields
4. Save the document (docx format)
5. Close the program
6 Open the document i receive this error 


I use the following code to set a documents mailmerge datasource

   nRichTextViewWithCommandBarsControl1.Widget.View.Content.MailMerge.DataSource = new NDBMailMergeDataSource(Nevron.Nov.Data.ENDbConnectionType.SqlServer, "Data Source=localhost;Initial Catalog=mydb;Integrated Security=True", "exec moduleDocumentMergeDataGet 1,3"); ;

This error occurs when also if i use the nevron "Select data source" dialog to select a datasource
Your help is greatly appreciated.
Mike Willis

By Nevron Support - 5 Years Ago
Hello,

Thank you for the detailed description of the issue you have experienced. Unfortunately, we couldn't reproduce it. Can you please send us or attach to a forum post the DOCX file you are getting the error with? Another option is to send us a sample project that demonstrates the issue. We will then be able to analyze and debug your code, find out what's wrong and fix it.

Thank you!
By Mike Willis - 5 Years Ago
Thanks for the reply.
The attached zip contains my visual studio 2017 test project and the document .

By Nevron Support - 5 Years Ago
Thank you for the attached sample project and document. We found that there's an issue with the mail merge when using an SQL database as data source.

We fixed the exception handling in this case and the DOCX file now loads without crashing, but the mail merge still does not work. We will analyze the issue further and try to fix the mail merge in with SQL databases in DOCX documents for the future versions of Nevron Open Vision.