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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Nested Mail Merge with Tables

Thread ID:

Created:

Updated:

Platform:

Replies:

103688 May 24,2012 01:22 PM UTC Jun 7,2012 12:54 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: DocIO
Markus
Asked On May 24, 2012 01:22 PM UTC

Hi

I am evaluating your DocIO for nested mailmerge use.
I have an XML file that is read into a dataset that has a structure about like this:
<data>
  <tax>12</tax>
  <Items>
    <Item>
      <Itemnumber someProperty="something">1</Itemnumber>
      ...
    </Item>
    <Item>
      <Itemnumber someProperty="something">2</Itemnumber>
      ...
    </Item>
  </Items>
</Data>

the generated dataset contains quite a lot of Tables. ie: Table "Item" doesn't contain a column "Itemnumber", but there is a separate Table "Itemnumber" that has a parent-child relation to "Item". this is because Itemnumber has Attributes and DataTable parsing such XML results in these tables.

I have successfully accomplished to display all the data by using BeginGroup and such, so I was trying to do the same with BeginTable where I got stuck:

I created a Table with two rows. the first containing the headercaptions, the second goes something like this ( | = column separation )
| <<BeginTable:Items>><<BeginGroup:Item>><<BeginGroup:Itemnumber>><<someProperty>><<EndGroup:Itemnumber>><<EndGroup:Item>> | ...more columns with more stuff ... | <<EndTable:Items>> |

(oh and btw. around the table is of course the <<BeginGroup:data>>)

This does not work though. I get either errors like "Item" group not found or the merging goes well but the resulting document isn't correct: either the different items aren't spread across different rows (but merged in one) or the Data in the second row doesn't differ from the first or there's no data at all.

I would love to see a working sample of this. Thanks

Ramkumar M [Syncfusion]
Replied On May 25, 2012 09:57 AM UTC

Hi Markus,

Thank you for your interest in Syncfusion products.

We have prepared the sample to meet your requirement of perform nested mail merge with the XML data that you provided, using DocIO.

To perform nested mail merge in a region the group start and end merge fields should be BeginGroup and EndGroup respectively. In a table the group start and end merge fields should be TableStart and TableEnd respectively. 

Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.

Regards,
Ramkumar



Sample_6e5a090f.zip

Markus
Replied On June 6, 2012 10:58 AM UTC

Well thanks for the reply.

First of all, you guys should improve the documentation to this.
Second: I think I wasn't clear enough. The data looks like this:

<data>
    <tax>0,19 €</tax>
    <taxamount>387,76 €</taxamount>   
    <Items>
        <Item>
            <lineitemnumber>1 </lineitemnumber>
            <productname>p787</productname>
            <extendedamount formattedvalue="1.166,20 €">1166.2</extendedamount>           
        </Item>
        <Item>
            <lineitemnumber>2 </lineitemnumber>       
            <productname>p523</productname>           
            <extendedamount formattedvalue="874,65 €">874.65</extendedamount>           
        </Item>
    </Items>
</data>

and I want to display each "Item" in it's own row so the rows look like:
|| 1 || p787 || ... || 1.166,20 € ||

do I need a "BeginGroup" inside the Table for this ? as far as I understood "TableStart" is for inserting new Rows, right?

thx for the help

Ramkumar M [Syncfusion]
Replied On June 7, 2012 12:54 PM UTC

Hi Markus,

We regret for the inconvenience caused.

By using Nested mail merge, you could not merge data from two different tables to a single row. As a workaround you can merge “extendedamount “and “Item” into single table then perform a simple mail merge.

We have prepared a sample to illustrate this work around .Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

Please let us know if you have any other questions.

Regards,
Ramkumar



Sample_3e24275a.zip

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.

Warning Icon 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.Close Icon

;