Skip to main content

Creating a Sub-Report for Drill Down - XML Datasource


Create a sub-report template for drill down to be used with the video "Creating Reports with Drill Down for an SQL Data Source".



Begin with a blank Microsoft Word document

Connecting to your data source

  1. Connect to the same data source as is used in your main template. The Northwind database is used in this example.
    • Connect to your data source by going to AutoTag Manager->Data Sources->Add->then selecting your data source from the dropdown.
  2. Click OK.
  3. Click Close.

Defining variables

  1. Click Variables in the AutoTag Manager tab.
  2. You will be prompted to save, save the file as Product Sales Inner.
  3. Click Add.
  4. Name the variable “prod” (because this sub-report will be linked from the product name.)
  5. Set the Type to Text.
  6. For default, type “Chai”.
  7. Click Save.

Querying your data (Adding a Query Tag)

  1. Open the Tag Builder (Found in the AutoTag Designer tab.)
  2. Select Query.
  3. Click the Select Tab.
  4. Click Wizard.
  5. Click the line “click here to add a node.”
  6. Navigate to windward-studios/Products, select the node Product, and click OK.
  7. Click the line “click here to add a group.”
  8. Click the line “click here to enter a condition.”
  9. In the condition, select the subnode ProductName (underneath Product).
  10. Leave the condition as equal to.
  11. Click the dropdown for the value field and select the parameter prod.
  12. Click the line “click here to add an order by.”
  13. Select the subnode ProductName.
  14. Click OK to exit the wizard.
  15. Under nickname, type “[product].”
  16. Under var, type “prodInfo”
  17. Click Save tag.

Adding Information to your Sub-Report

  1. Type “Product Name: ”
  2. Click Tags, Out Tag (Found in the AutoTag Designer tab.)
  3. Expand the data tree and click the subnode ProductName under prodInfo.
  4. Type “We have ”
  5. Using the same method, add an out tag for UnitsInStock.
  6. Type “ units in stock and ”
  7. Using the same method, add an out tag for UnitsOnOrder.
  8. Type “ units on order. Price per unit is”
  9. Using the same method, add an out tag for UnitPrice.
  10. Double click the UnitPrice out tag (opens the Tag Builder.)
  11. Click the more button in the format field, and choose currency.
  12. Click OK.
  13. Click Save Tag.
  14. Save the inner file and close.
  • Was this article helpful?