Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Adding a Template to an Existing Report Defintion, we saw see how you can to add OfficeWriter template information to a saved RDL file. In that case, the database query was defined before OfficeWriter opened the file in WordExcel. This section will explain how to develop a report from start to finish in Excel with OfficeWriter and Microsoft Query.

By default, OfficeWriter Designer's Add Query, Edit Query, and Delete Query buttons are disabled. These buttons are required for creating queries using Microsoft Query with OfficeWriter. If the query buttons are not available on the OfficeWriter toolbar, reset the registry key Enable MSQuery as follows:

...

Info

Before you begin, make sure that MS Query is enabled for the OfficeWriter Designer. Instructions for enabling MS Query can be found in 8.1 - Using MS Query in Excel to Design Reports.

Creating a Data Source

  1. Open Excel.
    # Click Add Query on the OfficeWriter Designer toolbar.
    # In the dialog box, type in a name for the query (or leave the default name "Query1"). Click Next.
    !xlw_NewTemplate1.jpg!
    # Click Add New to add a new database connection.
    !xlw_NewTemplate2.jpg!
    # Select New Data Source and click Ok.
    !xlw_NewTemplate3.jpg!
    # Enter a data source name and select SQL Server from the drop-down list of database drivers. Click Connect.
    !xlw_NewTemplate4.jpg!
    # From the drop-down list of server names, select the server where the AdventureWorks database is installed. Click Options and select AdventureWorks as the default database. Click Ok.
    !xlw_NewTemplate5.jpg!
    # You should now be back at the Create New Data Source screen. Click
    Ok.
    # You will see your new data source in the Choose Data Source dialog. Select it and click Ok to open Microsoft Query.
    !xlw_NewTemplate6.jpg!

...