We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Nested Data from DB


I read differents docs about MailMergeWithRegions and Nested Data but i’m not shure I can do what I want. Could someone tell me more.

I’m looking for made a Word Document which looks like something like that:

# Grand Father 1

# Father 1.1
# Son 1.1.1
# Son 1.1.2
# Father 1.2
# Son 1.2.1
# Son 1.2.2
# Son 1.2.3
# Father 1.3
# Son 1.3.1
# Grand Father 2
# …
My database looks like:

Columns : ID - NAME

Columns : ID - NAME - GrandFatherID

Columns: ID - NAME - FatherID
I have 3 differents SQL requests and I can’t modify them. Should a DataSet.Tables.Add(…)

Thanks for your help


Thank you for considering Aspose.

Please take a look how the Product Catalog demo works. It uses some workaround to replace nested regions and the result it produces is similar to yours. Pay attention to the comments, they describe well what the code does to obtain the result. However, if you have further questions, feel free to post them here.

So If I well understand the ProductCatalog demo, I will need to create one template for each Children level. To finaly combine them all ?

It’s in your roadmap to implement MailMerge with multi level ???


I'm trying to do something like That:

* ?DATA_5_1?

Yes, basically you should build several "pieces" - one for each Children level - and then combine them together. Unfortunately this is the only possible workaround in the meantime, adding support for nested regions is still several months away.

In my case, I couldn’t proceed like that. So I looking for other way to do it; please tell me if it’s possible or give me your opinion.

1/ Event on Execute.
I will try it:
Exectue an event on excuteMailMerge where I execute an other Exectue mailMerge, but I’m not sure it will works.

2/ SQL Request
I modify my requests to get all information, then I Check all data and I put Blank or Null value. To finally get something like that:

# Original DataSet:

# Checked DataSet:

# To Display:
I’d try it, but with blank value it lets Fields blank so I obtain something like that



3/ Made ExecuteMailMerge by mySelf
Clone section mySelf then fill them for each row. In fact made my own ExecuteMailMerge. I’m working on it.

4/ Virtual Template
Make as in Catalog Demo but with virtual template (new Doc, without Template file) to combine them. And apply good Formatting for each section.

Thanks for your feedBack

I think solution #3 or #4 (use of DocumentBuilder) you are working on are the best since nested regions are still several months away. Other ones look complicated or inapplicable.

The issues you have found earlier (filed as 39) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.