Page tree
Skip to end of metadata
Go to start of metadata

Intro

Demonstrates usage of the WordApplication and WordTemplate objects together. Generates a nested-data sales report from AdventureWorks data.

This sample uses the WordApplication object to create a new Word document that displays nested salesperson/sales item data. The data for this demo comes from the AdventureWorks database. First, a query for a list of salespeople is executed and a table for each salesperson is created with a surrounding bookmark. Then, the document is opened as a WordTemplate object and the bookmarks for each sales person are bound and populated with sales line-item data. The end-result is a document that displays five sales line items for each employee in a nested format.

Downloads

Output: SalesReport_out.doc

  • No labels