Nested Data from DB

Hi,

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
FAMILLY 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:

[GrandFathers]
Columns : ID - NAME




[Fathers]
Columns : ID - NAME - GrandFatherID

[Sons]
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

Hi,

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 ???

Thanks

I'm trying to do something like That:


?TableName:Loop2?
?DATA_2_1?
?TableStart:Loop3?
?DATA_3_1?
?TableStart:Loop4?
?DATA_4_1?
?TableStart:Loop5?
* ?DATA_5_1?
?TableEnd:Loop5?
?TableEnd:Loop4?
?TableEnd:Loop3?
?TableEnd:Loop2?

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:
[Level1][Level2][Level3][Level4]
[Level1][Level2][Level3][Level4]
[Level1][Level2][Level3][Level4]

# Checked DataSet:
[Level1][Level2][Level3][Level4]
[][][][Level4]
[][][][Level4]

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



Level4.value



Level4.value

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
Francois

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.
(2)