Intro

A generic purchase order document with a header section and an expanding Word table for detail rows.


This demo uses the setDataSource and setRepeatBlock methods together.  The SetDataSource method is used to assign all of the single-value items to the order header and total sections.  A repeat block is defined in the template document around one table row so that the table will automatically expand for every row of data in the order detail query.

http://windemo.softartisans.com/OfficeWriter/latest/WordWriter/Web/CSharp/ShowCode.aspx?p=wordtemplate/PurchaseOrder.aspx.cs

Code