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.
Unfortunately, activation email could not send to your email. Please try again.

Nested Mail Merge Group not working

Thread ID:

Created:

Updated:

Platform:

Replies:

101448 Oct 25,2011 05:38 AM Jan 15,2012 10:53 PM ASP.NET Web Forms (Classic) 14
loading
Tags: DocIO
Tasha
Asked On October 25, 2011 05:38 AM

Hi Support,

I have a table course data and schedule data. a course can have more than one data. I want to make a document that have a table of schedules from the chosen course. Let's say course X has 3 schedules A,B,C. the template is
<>
Course Id : <>
Course Name : <>

| Schedule Id | Schedule Name |
<>
|<>|<>|
<>

<>

I'm using document.MailMerge.ExecuteNestedGroup(dataset, command)
the dataset has 2 tables
- schedule
- scheduleList

the schedule table has 2 columns
- courseId
- courseName

the scheduleList table has 3 columns
- scheduleId
- scheduleName
- courseId

the commands are (i'm using VB.NET)
New DictionaryEntry("Schedule", String.Empty)
New DictionaryEntry("ScheduleList", "courseId = Decimal.Remainder( , Schedule.courseId )%")

The result is
Course Id : 1
Course Name : X

| Schedule Id | Schedule Name |
<>
| | |
<>

the schedule group works perfectly. but the data in scheduleList group doesn't. Am i missing something here?

attached is the screenshot of my data, mail merge template, and the result.



Thanks
Karina



Training Schedule_8d9cfac0.zip

Tasha
Replied On October 25, 2011 05:52 AM

Hi again... seems like double << is not allowed.. so i fixed it

Hi Support,

I have a table course data and schedule data. a course can have more than one data. I want to make a document that have a table of schedules from the chosen course. Let's say course X has 3 schedules A,B,C. the template is
-BeginGroup:Schedule-
Course Id : -courseId-
Course Name : -courseName-

| Schedule Id | Schedule Name |
-BeginGroup:ScheduleList-
|-scheduleId- |-scheduleName- |
-EndGroup:ScheduleList-

-EndGroup:Schedule-

I'm using document.MailMerge.ExecuteNestedGroup(dataset, command)
the dataset has 2 tables
- schedule
- scheduleList

the schedule table has 2 columns
- courseId
- courseName

the scheduleList table has 3 columns
- scheduleId
- scheduleName
- courseId

the commands are (i'm using VB.NET)
New DictionaryEntry("Schedule", String.Empty)
New DictionaryEntry("ScheduleList", "courseId = Decimal.Remainder( , Schedule.courseId )%")

The result is
Course Id : 1
Course Name : X

| Schedule Id | Schedule Name |
-BeginGroup:ScheduleList-
| | |
-EndGroup:ScheduleList-

the schedule group works perfectly. but the data in scheduleList group doesn't. Am i missing something here?

attached is the screenshot of my data, mail merge template, and the result.



Thanks
Karina



Gunasekaran T [Syncfusion]
Replied On October 28, 2011 02:45 AM

Hi Karina,

Thank you for your interest in Syncfusion products.

We have created a sample to illustrate your requirement to perform nested mail merge using DocIO. We have attached the sample for your reference; please do find the sample from the attachment. Try the attached sample and let us know if this helps you.

Could you please provide us the sample along with input template document to reproduce the mentioned issue with nested mail merge on our side for further analysis?

Please let us know if you have any other questions.

Regards,
Gunasekaran



Sample_da30be06.zip

Tasha
Replied On October 28, 2011 06:03 AM

Hi Support,

Thank you so much for your sample.
Unfortunately, I'm using data table instead of database connection.
My sample code is attached.

Karina Tasha




SampleDocIO_8897d074.zip

Poornima R [Syncfusion]
Replied On November 2, 2011 12:40 AM

Hi Karina,

Thank you for your update.

We have modified your sample to perform nested mail merge on the given template document. Please find the sample from the below link. Try running the sample and let us know if this helps you.

Sample:
SampleDocIO1154440786.zip

If you face any issues, please provide us with the following details for further investigating

1) Provide us with the clear information about the issue from your side
2) Provide us with the screen shot of the issues and the generated output word document
3) Provide us with the sample to reproduce the issue



Please let us know if you have any questions.

Regards,
Poornima



Tasha
Replied On November 2, 2011 03:14 AM

Hi Support

just tried it and it works!!!

thank you so much

Karina


Poornima R [Syncfusion]
Replied On November 3, 2011 02:24 AM

Hi Karina,

Thank you for your update.

Please let us know if you have any other questions.

Regards,
Poornima



Tasha
Replied On January 3, 2012 01:13 PM

Hi Support

so i tried the last sample you gave me and it worked.

i made some changes and i got this error message
Group 'Training_Schedule_List' is missing in the source document

attached is the template i use.

i used the code from your sample project.

any advice?





Training Schedule_905b0c5b.zip

Poornima R [Syncfusion]
Replied On January 5, 2012 06:31 AM

Hi Karina,

Thank you for your update.

For your requirement of performing nested mail merge within the table, please try using the group name as “TableStart” and “TableEnd” instead of “BeginGroup” and “EndGroup” respectively. We have prepared the modified document for your requirement. Please find the document from the below link. Try using the document and let us know whether the issue is resolved.

Modified document:
Training Schedule_Modified1324517736.zip

Please refer the below link for more information about nested mail merging

http://help.syncfusion.com/ug_94/Reporting/DocIO/ASP.NET/default.htm?turl=Documents%2F461nestedmailmerge.htm

Please let us know if you have any questions.

Regards,
Poornima





Gunasekaran T [Syncfusion]
Replied On January 6, 2012 08:01 AM

Hi Karina,

Thank you for your update.

In the provided template document the group start and end for a table is preserved as BeginGroup and EndGroup respectively, which causes the mentioned exception. Nested mail merge in a region works when the group start and end is BeginGroup and EndGroup respectively. Nested mail merge in a table works when the group start and end is TableStart and TableEnd respectively. We have modified your template document to overcome the mentioned exception while mail merging using DocIO. Please do find the modified template document from the attachment.

We have recently fixed an issue with populated data within table during nested mail merge. While performing mail merge with the modified template, merge fields in the table group will be preserved empty. 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. If you have already reported, please ignore this.

Please let us know if you have any questions.

Regards,
Gunasekaran




ModifiedDocument_9c65af08.zip

Tasha
Replied On January 7, 2012 12:10 PM

Hi Support

I'm a little bit confused.
the last sample you gave me 'SampleDocIO1154440786.zip' worked well using BeginGroup-EndGroup for the table and suddenly it didn't work (got the missing source exception). i didn't change the code. any idea the reason this error message occurs?

i tried to change it using TableStart-TableEnd, the document is created but the table is empty. Why is that?

i just report this issue to support. Hope they will respond it :)

Karina Tasha


Tasha
Replied On January 8, 2012 04:25 AM

Hi Support,

I did some changes on the template and it's working now.
Thank you so much for your help.

Anyway, another question is, i'm using MailMerge.RemoveEmptyParagraphs method on print to word feature and it works perfectly.
My question is, how to use it if i want to print the document to pdf?
My code:

Dim document As New WordDocument
document = New WordDocument("..\x.doc")
document.MailMerge.RemoveEmptyParagraphs = True
document.MailMerge.ExecuteNestedGroup(SetPrintTable(), SetPrintCommand())
document.Save("x.doc")

Dim converter As DocToPDFConverter = New DocToPDFConverter()
Dim pdfDoc As PdfDocument = converter.ConvertToPDF(document)

i still able to see the empty paragraph.
attached are the word template file, the file result in word format, and the file result in pdf format.

Any advice?

Karina Tasha



Training_Schedule_List_a6f6ee5d.zip

Poornima R [Syncfusion]
Replied On January 9, 2012 01:13 AM

Hi Karina,

Thank you for your update.

We could able to reproduce the mentioned issue with the “Preservation of empty paragraph in the converted Pdf even after setting MailMerge.RemoveEmpty paragraph as true value.”. 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 ignore if you have already reported this issue.

As a work around, please try converting the saved word document (x.doc) into pdf instead of converting document object into Pdf and let us know whether the mentioned issue is resolved.

Modified code snippet:
Dim document As New WordDocument
document = New WordDocument("..\x.doc")
document.MailMerge.RemoveEmptyParagraphs = True
document.MailMerge.ExecuteNestedGroup(SetPrintTable(), SetPrintCommand())
document.Save("x.doc")

Dim converter As DocToPDFConverter = New DocToPDFConverter()
Dim pdfDoc As PdfDocument = converter.ConvertToPDF("x.doc")

Please find the sample from the below link illustrating the same. Try running the sample and let us know if this helps you.
Sample:
SampleDocIO-572680974.zip

Please let us know if you have any questions.

Regards,
Poornima



Tasha
Replied On January 13, 2012 04:57 AM

Hi Support

thanks for the update.. it works perfectly!!!

Karina Tasha


Poornima R [Syncfusion]
Replied On January 15, 2012 10:53 PM

Hi Karina,

Thank you for your update.

Please let us know if you have any other questions.

Regards,
Poornima



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.

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.

;