Evaluation: Do you support complex tables? (Attached Example)

I have been asked to evaluate this product for generating documents based on a template. Some parts of these documents have very complex tables.

I have looked into the region mail merge and it seems like these tables might be too difficult because they contain both horizontal and vertical headers. You can have 5 records displayed vertical but 2 might need to have one vertical header and 3 under another. You should understand more clearly after looking at the example.

Are tables like this possible?

Thank you,

Matt

Hi Matt,
Thanks for your interest in Aspose.Words.
From looking at your template it appears Aspose.Words should be able to merge these tables even with presense of vertical headers. It is a bit difficult to visualize exactly how the output it going to be like though. Are you able to attached a simple output document (manually entered) demonstrating the expected output and we will take a closer look it.
Thanks,

I have entered in some basic data to see if it makes more sense.

To better explain myself, the key questions I had are:

  1. Will there be a problem with dynamic vertical merging?. (ie, for Type 1 there might be 6 rows and Type 2 there might be 4 rows. The amount of rows per type (vertical headers) will be different every time the document is generated).
  2. Can I have check boxes in cells that can dynamically be checked or not checked.

Thanks,

Matt

Hi Matt,
Thanks for this additional information.

  1. Yes this type of vertical merging within regions is possible, however the merging of these cells will have to be done manually with a little extra code. This is because, by design it’s not possible to set cells as vertically merging as they don’t exist until the data rows are acutally merged and the rows of the table created.

    This is all fairly easy to implement with a few adjustments to your template and by using the FieldMergingCallBack handler property in your application.

    The easiest way to implement the merging of your data in your document is indeed using regions as you suggested, but more specifically using nested regions as described in this article here.

    As a solution to the vertical merging, you need to add a tag to the merge fields in the cells that you want to be vertically merged which will be handled by the handlers defined in the FieldMerging property. This tag goes in the field result (written straight onto the field so it will not affect the field code itself).

    The handler set up in the FieldMergingCallback property will fire each time a merge field is encountered. These will mark the merge fields with the tags to be vertically merged after the data is entered.

    The best way to understand how this is working is to look at the code itself. I have attached the code example, template and it’s output to this post. If there is anything unclear feel free to ask.

  2. Yes this is possible and can be done by implementing the same hanlder as above. Please see the second sample code entry for this API example of the DocumentBuilder class. You can also download the full sample pack here and run this code with the actual documents as well.

Thanks,

Great!

Thanks

The issues you have found earlier (filed as WORDSNET-50) have been fixed in this .NET update and this Java update.

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