Free Support Forum - aspose.com

Aspose.Words Mailmerge : Master detail tables nested in Aspose.Words for .NET

I have a master table and a detail table which needs to be nested for .NET mail merge using Aspose.Words. There could be multiple master rows in a page and the detail rows should follow each master row

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Eg:

Patient Name: SUE, Check# 123456 is a master record.

There will be multiple detail lines following this master record.

Then it should print the second master record, Patient Name: ALEX , Check# 123457followed by its detail table. We tried nested tables with detail tables nexted inside the master table. This gave us an error: “Nested Tables are not yet supported. “. Pls. advise,

Thanks.

Hema.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your inquiry. There is no direct way to populate nested regions using Aspsoe.Words. It is possible, however, to generate the above reports by performing mail merge several times and building up a resulting document from several documents or fragments. The Product Catalog and Sales Invoice samples in the demo project supplied with Aspose.Words demonstrate the suggested techniques.

http://www.aspose.com/demos/file-format-components/aspose.words/csharp/general/product-catalog.aspx

Hope this helps.

Best regards.

Thanks for the quick response. I tried out the master detail relationships in the category-order demo, it works fine except that each master row is printed on a new page, can we have mutiple master rows followed by details printed on the same page if there is space, instead of printing on a new page with the header information printed again on the top ?

Pls. see the sample attached,

Thanks

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Yes, of course, you can have few items on the same page. You should just specify section start Continuous instead of New Page. See the following snippet of code:

srcDoc.Sections[0].PageSetup.SectionStart = SectionStart.Continuous;

you should specify this just before appending section to the main document.

Hope this helps.

Best regards.

Thanks a bunch, this works. Except fro a minor issue. The header is repeated each time. We have two word tables with mailmerge fields displayed on the top of the document as header. Then the master rows and details are printed. By specifying the sectionstart as continous, the second page is appendend onto the first page along with the header. Is there any way to suppress the header the second time onwards without leaving the empty space there..

Thank you,

Hema.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Maybe you should also unlink Headers/Footers. Please try adding the following line of code:

srcDoc.Sections[0].HeadersFooters.LinkToPrevious(false);

Also, please make sure that section which you append to the main document does not have headers/footers.

Hope this helps.

Best regards.

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.