Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

An a RDL file is an xml-based report definition file. In this tutorial we will assume the RDL was created in Visual Studio or Report Builder. If you are interested in creating RDLs with the OfficeWriter Designer, read Using MS Query in Word to Design Reports.

  1. Open Microsoft Word

  2. # Go to the OfficeWriter Designer tab and click Open Report

  3. # If your report defintion file was saved on a local or network drive, navigate to the folder containing the file, select it, click Open, and continue to Adding Fields to your report
    If your RDL file was deployed to Reporting Services, click the Retrieve on the bottom right corner of the dialog box.
    !ww_FirstfromRDL1.jpg!
    #
    Image Added

  4. In the Report Browser dialog box, type in your report server's URL or Domain name and click Refresh. This will load all the available report folders into the list box. Navigate to your report file, select it, and click Ok.
    !ww_FirstfromRDL2.jpg!
    Image Added

Adding Merge Fields to Your Report

...

For this tutorial we will use an RDL that was created in Visual Studio containing a data set with the following query:

\

After opening your report in Word with the OfficeWriter toolbar, you should find your query listed under Merge Fields > DataSets.
\

  1. Place a two column, two row table in your report template.
    !ww_FirstfromRDL6.jpg!
    #
    Image Added

  2. Place your cursor in the top left cell of the table.

  3. # Go to Merge Fields in the OfficeWriter Designer toolbar and locate your query from the drop-down list.

  4. Hover over the query to open the Merge Field Menu.
    !word_ribbon_datasets.png!
    #
    Image Added

  5. Select LastName from under Insert Merge Field to insert a merge field into the table cell. Your report should now look like this:
    !ww_FirstfromRDL7.jpg!
    #
    Image Added

  6. After the AdventureWorks.LastName merge field, type in a comment and a space. Go to Merge Fields > the data set > Insert Merge Field and select FirstName. Your report should now look like this:
    !ww_FirstfromRDL8.jpg!
    #
    Image Added

  7. Place your cursor in the top right cell of the table. Go to Merge Fields > the data set > Insert Merge Field and select Title.
    #
  8. In the bottom left cell, type Employee ID: and insert the EmployeeID field.

  9. # Place your cursor in the bottom right cell of the table. Insert the EmailAddress field.

...

  1. With your mouse, highlight the entire table on your report. Select not only the table, but also include the blank row below the table.
    !cfwr_figure11.jpg!
    #
    Image Added

  2. Go to Data Markers > the data set. Under Repeat Region, select Set Selection to Repeat Region to wrap the section in the repeat bookmark.

...

  1. From the OfficeWriter Designer toolbar select Save. You will have the option to Save to Disk or Deploy to Remote Server.
    #
  2. Select Save to Disk.

  3. # Navigate to a local folder where you will store the template report file. This will be where you store your work file in case you want to edit it later, not a location on the Reporting Services server.
    #
  4. Save the template as an RDL file.

  5. # To publish the report, from the toolbar, click Save and select Deploy To Remote Server.
    #
  6. From the Publish dialog box select the drop-down to display the Server or URL.
    #
  7. Choose the server on which Reporting Services is installed.
    #
  8. Click Refresh.

  9. # Select a folder for which you have publish rights and click Ok.

  10. # If your report published with no errors, you will receive a Publish Successful message dialog. Click Ok to continue.

  11. # To view the report, click View on the OfficeWriter Designer. The report viewer will open another Word window with the report results. It should look like this:
    !ww_FirstfromRDL12.jpg!
    #
    Image Added

  12. Select Close Report View to return to your report template.

...

  1. Open a browser and go to the Reporting Services Report Manager (usually installed at http://<server address>/Reports).
    #
  2. Navigate to where you published your report.

  3. # Select the report. Reporting Sevices will display the report but only show you the data set.
    #
  4. From the export option drop-down, choose Word designed by OfficeWriter.

  5. # When prompted, click Open . Word will open and display your report the way you created it.

...