I used Words on a recent project with many reports and it worked great.
I had table in a word document wrapped in table start/end and a final total (no sub totals). It was easy to handle a final total. I just placed a row in the MS Word table with field names, then populated the totals by using the Document.MailMerge.Execute(fields,values) with amounts I accumulated and it worked great. This will not work for sub-totals.
My question is this: I have a table and in the data source it may contain 1 or more States. I need to sub-total the amount by State in the table. So in this case I cannot use Document.MailMerge.Execute(fields,values).
How can I best accomplish this task? Will I need to create a data table and populate it from the data source and then in a loop handle the accumulation of totals by state, and when the state breaks to the new state, insert a sub-total row in the data table and then use that data table in the MS Word table start/end? I am wondering if there is an eaiser way to handle this type of control-break sub-total process?