3. Using Reports with Other Documents
After you create a report and get it to look just
right, you’ll want to use it in other similar drawings and diagrams.
Let’s now take a quick look at one way to port the report to another
drawing.
Transferring Reports to Other Drawings
1. | Continue working with Ch7 Shape Data.vsd.
|
2. | Select a few light bulb shapes and copy them to the Clipboard.
|
3. | Start a new, blank drawing and paste the shapes to it.
|
4. | Click
Review, Shape Reports. Notice that Light Bulb Use report definition
isn’t in the list of reports. That report is stored in the other
drawing (and a modified copy is stored in the report shape).
|
5. | Close
the Report window and then return to Ch7 Shape Data.vsd. (Press
Ctrl+Tab or click the Switch Windows button in the lower-right corner.)
|
6. | Select the report shape and copy it.
|
7. | Return to the blank drawing and paste a copy of the report shape.
|
8. | Right-click
the report shape and choose Run Report. The report shape updates to
show the light bulb shapes that you copied into the new drawing.
|
For portability and ease of modification, I prefer
working with report definitions saved in report shapes. If you think
you will want to send the output to Excel, HTML, or XML, however,
shape-stored reports make this difficult. These formats are especially
valuable for reports that are too large for a shape on the page.
A good workflow might be as follows:
1. | Start by defining a drawing-stored report.
|
2. | Experiment, tweak, polish, and perfect it.
|
3. | Export
it to a .VRD (Visio Report Definition) file. This is done on the last
screen in the Report Definition Wizard, where the Finish button is
located. Just check Save in a File, enter a path, and Visio spits out
an XML-based definition of your report.
Visio doesn’t seem to remember the paths for saved reports, so you end
up browsing to the save location every time you modify and run the
report. You can avoid the browsing by working with a document-saved
report until it is perfected.
|
4. | When
the definition is perfect, go to the Finish screen of the Report
Definition Wizard and check “Save in a file” to export the report to a
.VRD file. Having a report file is nice for backup purposes and for
sharing with colleagues.
|
5. | Run the report to a report shape and then update the shape so that the definition is saved in the report shape itself.
|
6. | Add the report shape to your Favorites stencil, and re-use it whenever you want to add a shape-based report in a drawing.
|
7. | Call up the report file when you need Excel, HTML, or XML output. |