UNIT6-open / TemplateEngine.Docx

Smart docx template engine for .NET
Other
408 stars 136 forks source link

Filling a table total row do not work #32

Open 4zm0d4n opened 7 years ago

4zm0d4n commented 7 years ago

I was following your first example of filling in a table with few rows and one total row at the end. I wasn't able to make the total row show any data - it was black after processing. Then I decided to check your own example code. Here is extract of the code I am following as example and which I tested:

... // Add table. new TableContent("Team Members Table") .AddRow( new FieldContent("Name", "Eric"), new FieldContent("Role", "Program Manager")) .AddRow( new FieldContent("Name", "Bob"), new FieldContent("Role", "Developer")), // Add field inside table that not to propagate. new FieldContent("Count", "2"), ...

The example above was failing too - to fill in the total row. Here what the final table looks like (note I can paste here the table content only):

Name Role Eric Program Manager Bob Developer Total members

As you can see the Total row looks like:

Total members

but should look like:

Total 2 members

So I believe that I am following the example correctly and there is a bug when filling in the content.