Create an Word Report from an Existing RDL
This tutorial will help you design your first report in Word using the OfficeWriter for Word Designer from an existing report file (RDL) that was created in Visual Studio or Report Builder. We will build a simple employee list and display some basic information about each employee.
Info | ||
---|---|---|
| ||
For more information on installing and configuring OfficeWriter Reporting Services Integration, see Installation or contact your System Administrator. |
OfficeWriter Designer Toolbar
The control center for creating reports with OfficeWriter is the OfficeWriter Designer toolbar. When you open Word, you will the OfficeWriter Designer tab in the ribbon.
...
- Make sure that you ran the installer for the OfficeWriter Designer, which is a separate installer from OfficeWriter.
- If you do not see the toolbar after running the installer, the toolbar may have been disabled. Please see this OfficeWriter Answers Post for more information.
Opening a Report File
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 8.1 - Using MS Query in Word to Design Reports.
- Open Microsoft Word
# Go to the OfficeWriter Designer tab and click Open Report
# 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!
# 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!
Adding Merge Fields to Your Report
When you open the report, the Designer parses the RDL for information about the data sets and makes that information available while you are working in Word. Data sets will appear in a drop-down list and you will be able to insert fields from those data sets into the Word template as data placeholders called data markers.
...
Your finished report template should look like this:
Setting a Repeat Region
There are two ways to import data into an OfficeWriter for Word report: at the Document level or in a Repeat Region. If a dataset is imported at the Document level, merge fields from this query can appear anywhere in the document, and only the first row of data is imported into the report. If a dataset is imported into a Repeat Region, merge fields for that dataset must be contained in a section of the document wrapped in a special bookmark. Everything within the bookmark region will be repeated for each row of data in the dataset.
...
Note |
---|
If you highlight a table without highlighting a row after it, the report will include a separate table for each employee without spaces between them. It would look like one long continuous table. Many times you will want to do this, but for this demo, we want to make it look like separate tables. |
Publish and View Your Report
Before publishing the report on the Reporting Services server, we must save the Word template locally as an RDL file.
...
- Open a browser and go to the Reporting Services Report Manager (usually installed at http://<server address>/Reports).
# Navigate to where you published your report.
# Select the report. Reporting Sevices will display the report but only show you the data set.
# From the export option drop-down, choose Word designed by OfficeWriter.
# When prompted, click Open . Word will open and display your report the way you created it.