- Home
- Forum
- ASP.NET Web Forms (Classic)
- doc.MailMerge.ExecuteGroup with only one filed in datatable
doc.MailMerge.ExecuteGroup with only one filed in datatable
Hello
I try to process a doc.MailMerge.ExecuteGroup.
In my doc template, I have a table with only one cell, containing :
_______________________________________
«TableStart:piece»«piece»
«TableEnd:piece»
_______________________________________
In my xml file, my datatable have just one entry for this one :
_______________________________________
102
toto.txt
_______________________________________
My problem is that when I read the result doc file, I can see "toto.txt" twice, like that :
_______________________________________
toto.txt
toto.txt
_______________________________________
Any idea ?
Thanks
I try to process a doc.MailMerge.ExecuteGroup.
In my doc template, I have a table with only one cell, containing :
_______________________________________
«TableStart:piece»«piece»
«TableEnd:piece»
_______________________________________
In my xml file, my datatable have just one entry for this one :
_______________________________________
_______________________________________
My problem is that when I read the result doc file, I can see "toto.txt" twice, like that :
_______________________________________
toto.txt
toto.txt
_______________________________________
Any idea ?
Thanks
SIGN IN To post a reply.
6 Replies
LU
Lucie
January 23, 2007 11:08 AM UTC
the datatatable is :
table1
id_mailing 102 /id_mailing
piece toto.txt /piece
/table1
table1
id_mailing 102 /id_mailing
piece toto.txt /piece
/table1
DK
Dhivya K
Syncfusion Team
January 25, 2007 07:23 AM UTC
Hi Lucie,
Sorry for the delay in getting back to you.
MailMerge.ExecuteGroup will merge the fields for all the rows in the datatable. It seems you have two rows in the data table.If you have only one row but multiple columns, then it will not repeat the value.
Here is a sample for your reference.
In this sample, you can find that the text appears only once.
You can also use MailMerge.Execute to merge fields from datarow.
Could you please provide me your sample xml file? This will help me investigating further on this issue.
Regards,
Dhivya.
Sorry for the delay in getting back to you.
MailMerge.ExecuteGroup will merge the fields for all the rows in the datatable. It seems you have two rows in the data table.If you have only one row but multiple columns, then it will not repeat the value.
Here is a sample for your reference.
sample.zip
In this sample, you can find that the text appears only once.
You can also use MailMerge.Execute to merge fields from datarow.
Could you please provide me your sample xml file? This will help me investigating further on this issue.
Regards,
Dhivya.
LU
Lucie
January 25, 2007 09:38 AM UTC
Hi Dhivya
Thanks for your answer. I can see that it works great in your example, but it doesn't work for me.
I give you my samples.
Thanks
Lucie
envoi_syncfusion.zip
Thanks for your answer. I can see that it works great in your example, but it doesn't work for me.
I give you my samples.
Thanks
Lucie
envoi_syncfusion.zip
DK
Dhivya K
Syncfusion Team
January 29, 2007 05:37 AM UTC
Hi Lucie,
Thanks for the files. I was able to reproduce the issue with your sample documents. The problem is, you have your table name and field name["piece"] as same in the mergefields of your template document.
I have changed the table name and it works fine.
Here is a sample for your reference
Please take a look into it and let me know if you have any queries.
Regards,
Dhivya.
Thanks for the files. I was able to reproduce the issue with your sample documents. The problem is, you have your table name and field name["piece"] as same in the mergefields of your template document.
I have changed the table name and it works fine.
Here is a sample for your reference
sample.zip
Please take a look into it and let me know if you have any queries.
Regards,
Dhivya.
LU
Lucie
January 29, 2007 08:26 AM UTC
Hi Dhivya,
It works great for me now !!!!
Thanks a lot !
Lucie
It works great for me now !!!!
Thanks a lot !
Lucie
DK
Dhivya K
Syncfusion Team
January 30, 2007 04:05 AM UTC
Hi Lucie,
Thanks for the update. Glad to know that it helps you! Please let me know if you have any other queries.
Regards,
Dhivya.
Thanks for the update. Glad to know that it helps you! Please let me know if you have any other queries.
Regards,
Dhivya.
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
LU Lucie
- Jan 23, 2007 11:05 AM UTC
- Jan 30, 2007 04:05 AM UTC