0% found this document useful (0 votes)
98 views

Report Writer Tutorial

Tutorial Completo

Uploaded by

John Campoverde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

Report Writer Tutorial

Tutorial Completo

Uploaded by

John Campoverde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 258

Microsoft Dynamics GP 2010

Report Writer Users Guide

Copyright

Copyright 2011 Microsoft Corporation. All rights reserved.

Limitation of liability

This document is provided as-is. Information and views expressed in this document, including
URL and other Internet Web site references, may change without notice. You bear the risk of using
it.
Some examples depicted herein are provided for illustration only and are fictitious. No real
association or connection is intended or should be inferred.

Intellectual property

This document does not provide you with any legal rights to any intellectual property in any
Microsoft product.
You may copy and use this document for your internal, reference purposes.

Trademarks

Microsoft, Dexterity, Excel, Microsoft Dynamics, Visual Basic, Windows, and Windows Vista are
trademarks of the Microsoft group of companies. FairCom and c-tree Plus are trademarks of
FairCom Corporation and are registered in the United States and other countries.
All other trademarks are property of their respective owners.

Warranty disclaimer

Microsoft Corporation disclaims any warranty regarding the sample code contained in this
documentation, including the warranties of merchantability and fitness for a particular purpose.

License agreement

Use of this product is covered by a license agreement provided with the software product. If you
have any questions, please call the Microsoft Dynamics GPCustomer Assistance Department at
800-456-0025 (in the U.S. or Canada) or +1-701-281-6500.

Publication date

January 2011

Contents
Introduction ................................................................................................................................. 2
Whats in this manual .................................................................................................................. 2
Symbols and conventions............................................................................................................ 3
Product support ............................................................................................................................ 3

Part 1: Basics ............................................................................................................................. 6


Chapter 1: Getting Started with the Report Writer .............................. 7
Report Writer tasks ....................................................................................................................... 7
Terminology................................................................................................................................... 8
Storing reports............................................................................................................................... 8
Starting the Report Writer ........................................................................................................... 9

Chapter 2: The Report Writer Interface ......................................................... 11


The main window and toolbar ................................................................................................. 11
Menus ........................................................................................................................................... 11
Windows ...................................................................................................................................... 13
Standard buttons......................................................................................................................... 15

Part 2: Creating Reports ......................................................................................... 18


Chapter 3: Report Definition .................................................................................. 19
Creating a new report definition .............................................................................................. 19
Report options............................................................................................................................. 22
Printing a report definition ....................................................................................................... 25

Chapter 4: Report Layout ........................................................................................... 27


Creating a report layout............................................................................................................. 27
Layout sections............................................................................................................................ 28
The Toolbox ................................................................................................................................. 30
Adding fields to a report layout ............................................................................................... 33
The Properties window.............................................................................................................. 34
Report properties ........................................................................................................................ 35
Field properties ........................................................................................................................... 36
Drawn object properties ............................................................................................................ 37

USERS

GUIDE

C O N T E N T S

Report field characteristics ....................................................................................................... 38


Applying drawing options ....................................................................................................... 40

Chapter 5: Sorting............................................................................................................. 43
Using a main table key .............................................................................................................. 43
Creating a sorting definition .................................................................................................... 43

Chapter 6: Restrictions................................................................................................. 47
Defining report restrictions ...................................................................................................... 47
Restriction functions .................................................................................................................. 49

Chapter 7: Calculated Fields ................................................................................... 57


Creating a calculated field ........................................................................................................ 58
Operators..................................................................................................................................... 59
Fields tab ..................................................................................................................................... 61
Constants tab .............................................................................................................................. 63
Functions tab............................................................................................................................... 63
System-defined functions ......................................................................................................... 64
User-defined functions .............................................................................................................. 69

Chapter 8: Additional Headers and Footers .............................................. 71


Overview of headers and footers............................................................................................. 71
The order of headers and footers............................................................................................. 72
Creating additional headers or footers ................................................................................... 73

Chapter 9: Legends .......................................................................................................... 77


Using legends ............................................................................................................................. 77
Legends example........................................................................................................................ 78

Chapter 10: Modifying Fields.................................................................................. 79


Field visibility ............................................................................................................................. 79
Specifying a format resource .................................................................................................... 80
Specifying a format field ........................................................................................................... 81
Changing display types ............................................................................................................ 82
Display type summary .............................................................................................................. 85

ii

U S E R S

G U I D E

C O N T E N T S

Part 3: Gathering Data .............................................................................................. 88


Chapter 11: Data Storage .......................................................................................... 89
Terminology................................................................................................................................. 89
Table names ................................................................................................................................. 92
Table types ................................................................................................................................... 93
Table groups ................................................................................................................................ 93

Chapter 12: Table Relationships .......................................................................... 95


Table relationship overview ...................................................................................................... 95
Types of table relationships....................................................................................................... 95
Defining a table relationship..................................................................................................... 96

Chapter 13: Virtual Tables ...................................................................................... 101


Virtual table overview.............................................................................................................. 101
Viewing virtual table information.......................................................................................... 101
Using virtual tables with reports............................................................................................ 102

Part 4: Modifying Reports ................................................................................ 104


Chapter 14: Selecting a Report to Modify .............................................. 105
Finding a report name.............................................................................................................. 105
Creating a modified report...................................................................................................... 106
Modifying the current report .................................................................................................. 106

Chapter 15: Viewing a Modified Report .................................................... 109


Viewing from the Report Writer ............................................................................................. 109
Viewing from the application ................................................................................................. 110

Chapter 16: Common Modifications ............................................................. 113


Modifying the layout................................................................................................................ 113
Changing the page orientation ............................................................................................... 114
Adding or removing fields...................................................................................................... 114
Using VBA with reports .......................................................................................................... 115
Reports Library ......................................................................................................................... 116

USERS

GUIDE

iii

C O N T E N T S

Part 5: Global Modifications .......................................................................... 118


Chapter 17: Data Types ............................................................................................. 119
Opening a data type .................................................................................................................119
Keyable length .......................................................................................................................... 120
Static values .............................................................................................................................. 120
Format........................................................................................................................................ 121

Chapter 18: Formats ..................................................................................................... 123


Opening a format ..................................................................................................................... 123
Formatting options .................................................................................................................. 124
Format string ............................................................................................................................ 125

Chapter 19: Global Fields ........................................................................................ 127


Opening a global field ............................................................................................................. 127
Opening a fields data type..................................................................................................... 128

Chapter 20: Pictures .................................................................................................... 129


Adding a picture to the picture library ................................................................................. 129
Using a picture from the picture library ............................................................................... 130
Guidelines for using logos ...................................................................................................... 131

Chapter 21: Strings ....................................................................................................... 133


Using strings ............................................................................................................................. 133
Modifying a string ................................................................................................................... 133

Chapter 22: Tables ......................................................................................................... 135


Table elements .......................................................................................................................... 135
Keys............................................................................................................................................ 136
Key segments ............................................................................................................................ 136
Key options ............................................................................................................................... 137
Segment options ....................................................................................................................... 137

Part 6: Printing and Mailing Reports ................................................. 140


Chapter 23: Printing Reports ............................................................................... 141
Printing modified reports ....................................................................................................... 141
Printing custom reports........................................................................................................... 142
Printing in the Report Writer.................................................................................................. 144

iv

U S E R S

G U I D E

C O N T E N T S

Chapter 24: Mailing Reports ................................................................................ 147


MAPI........................................................................................................................................... 147
Attachment types...................................................................................................................... 147
Mailing a report ........................................................................................................................ 148

Chapter 25: Exporting Data .................................................................................. 149


Export formats........................................................................................................................... 149
Creating reports for exporting ................................................................................................ 150

Part 7: Report Design ............................................................................................. 152


Chapter 26: Report Design Guidelines ....................................................... 153
Report design ............................................................................................................................ 153
Optimizing reports ................................................................................................................... 155

Chapter 27: Preprinted Forms ............................................................................ 157


Report definition settings ........................................................................................................ 157
Report layout............................................................................................................................. 158
Printing preprinted reports ..................................................................................................... 159

Chapter 28: Groups ...................................................................................................... 161


Group overview ........................................................................................................................ 161
Sorting for groups..................................................................................................................... 162
Group headers........................................................................................................................... 162
Group footers ............................................................................................................................ 163
Counting items in a group....................................................................................................... 164
Counting groups ....................................................................................................................... 164
Totaling and subtotaling .......................................................................................................... 165
Advanced groups ..................................................................................................................... 166

Chapter 29: Checks, Invoices, and Labels ............................................... 167


Checks ........................................................................................................................................ 167
Invoices....................................................................................................................................... 169
Labels.......................................................................................................................................... 169

USERS

GUIDE

C O N T E N T S

Part 8: Storing and Accessing Reports .......................................... 172


Chapter 30: Storing Reports ................................................................................ 173
Reports dictionary.................................................................................................................... 173
Launch file................................................................................................................................. 174
Report Writer configurations.................................................................................................. 175

Chapter 31: Accessing Reports ......................................................................... 177


Accessing the Report Writer ................................................................................................... 177
Accessing modified reports .................................................................................................... 178
Accessing custom reports ....................................................................................................... 179
Accessing third-party reports................................................................................................. 180
Removing modified reports.................................................................................................... 182

Chapter 32: Packaging Reports ......................................................................... 183


Package files.............................................................................................................................. 183
Exporting a package file.......................................................................................................... 184
Importing a package file ......................................................................................................... 185
Package file import/export issues......................................................................................... 186

Chapter 33: Importing Reports .......................................................................... 187


Importing from a reports dictionary ..................................................................................... 187
Validating reports..................................................................................................................... 188

Part 9: Word Templates ........................................................................................ 192


Chapter 34: Overview of Word Templates ............................................... 193
Template-enabled reports ....................................................................................................... 193
Report definition ...................................................................................................................... 194
Report template document ..................................................................................................... 194
How Word Templates are processed ..................................................................................... 195
Capabilities of Word templates .............................................................................................. 196

Chapter 35: Setting Up Microsoft Word .................................................... 197


Add-in for Microsoft Word ..................................................................................................... 197
Microsoft Word settings .......................................................................................................... 199

vi

U S E R S

G U I D E

C O N T E N T S

Chapter 36: Report Template Design ........................................................... 201


Document structure.................................................................................................................. 201
Creating a report template layout with tables...................................................................... 203
Fields, captions, and legends .................................................................................................. 205
Bookmarks ................................................................................................................................. 207
Company image........................................................................................................................ 208
Tips for working with report template documents ............................................................. 209
Common report template patterns......................................................................................... 210

Chapter 37: Creating Report Templates .................................................... 213


Overview of creating report template documents............................................................... 213
Creating a new report template document ........................................................................... 213

Chapter 38: Report Templates for Modified Reports .................... 217


Modifying the report definition.............................................................................................. 217
Creating a modified report template document .................................................................. 218
Using the modified report template document.................................................................... 221
Updating the data source for a report template ................................................................... 223

Chapter 39: Troubleshooting Templates ................................................... 225


Template layout issues ............................................................................................................. 225
Template processing issues ..................................................................................................... 226

Appendix .................................................................................................................................. 230


Appendix A: User-defined Functions ........................................................... 231

Glossary ..................................................................................................................................... 235


Index............................................................................................................................................... 239

USERS

GUIDE

vii

viii

U S E R S

G U I D E

INTRODUCTION

Introduction
Welcome to the Report Writer, the tool you can use to create and customize
reports. With the Report Writer, you can change the appearance of existing
reports, make global changes that affect all reports, or create your own new
reports. If you have the Modifier with Visual Basic for Applications (VBA),
you can use scripting to further customize your reports.

Whats in this manual


This manual is designed to give you an in-depth understanding of how to
use the Report Writer to customize and create new reports in the accounting
system.

Part 1, Basics, describes how to get started with the Report Writer, and
describes the Report Writer interface.

Part 2, Creating Reports, explains how to create the various elements


that make up a report.

Part 3, Gathering Data, describes how data is stored in the accounting


system and how to assemble the data you need to create a report.

Part 4, Modifying Reports, explains how to modify existing reports in


the accounting system.

Part 5, Global Modifications, explains how to make modifications that


affect all reports in the application.

Part 6, Printing and Mailing Reports, describes how to print reports,


export data from them, and mail them to other users.

Part 7, Report Design, provides guidelines for creating reports and


describes common design elements of reports.

Part 8, Storing and Accessing Reports, describes the Reports dictionary. It also explains how to control access to reports you have modified with the Report Writer. Packaging reports is also described.

You can also refer to the Report Writer online help for more information
about using the Report Writer. The sample reports available for Microsoft
Dynamics GP are another good source of information.

U S E R S

G U I D E

IN TRO DUCT IO N

Symbols and conventions


To help you use the Report Writer documentation more effectively, weve
used the following symbols and conventions within the text to make
specific types of information stand out.
Symbol

Description

The light bulb symbol indicates helpful tips,


shortcuts and suggestions.
Warnings indicate situations you should be
aware of when using the Report Writer.
Margin notes summarize Margin notes call attention to critical
important information.
information, and direct you to other areas of the

documentation where a topic is explained.

Convention

Description

Part 1, Basics

Bold type indicates a part name.

Chapter 5, Sorting

Quotation marks indicate a chapter name.

Applying drawing options Italicized type indicate a section name.


Software Development
Kit (SDK)
TAB

or ALT+M

Acronyms are spelled out the first time theyre


used.
Small capital letters indicate a key or a key
sequence.

Product support
Technical support for the Report Writer can be accessed using the following
methods.

Telephone support Technical Support at (888) 477-7877 between 8:00


a.m. and 5:00 p.m. Central Time, Monday through Friday. International
users can contact Technical Support at (701) 281-0555.

Internet Report Writer Technical Support is also available online


through CustomerSource or PartnerSource, and is accessible from
www.microsoft.com/Dynamics/GP.

USERS

GUIDE

U S E R S

G U I D E

PART 1: BASICS

Part 1: Basics
This portion of the documentation contains basic information you should
know before you begin using the Report Writer. The following information
is discussed:

U S E R S

G U I D E

Chapter 1, Getting Started with the Report Writer, describes the basic
tasks you can perform with the Report Writer, the terminology used to
describe reports, and how reports are stored. It also describes how to
start the Report Writer.

Chapter 2, The Report Writer Interface, describes the interface for the
Report Writer.

Chapter 1:

Getting Started with the Report


Writer
Before you begin working with the Report Writer, you should have a basic
understanding of the types of tasks you can perform, terminology used in
the Report Writer, and how reports are stored. Information is divided into
the following sections:

Report Writer tasks


Terminology
Storing reports
Starting the Report Writer

Report Writer tasks


You can use the Report Writer to perform three basic tasks: Modifying
existing reports, creating new reports, and making global changes for
reports.

Modifying existing reports


With the Report Writer, you can change the appearance of individual
reports in the accounting system. This allows you to customize your system
to meet your specific needs. For instance, a common modification is
changing the layout of an invoice to match the invoice format you currently
use.

Creating new reports


Though many predefined reports are included with the accounting system,
a specific report you need may not be available. You can use the Report
Writer to create new reports for the accounting system.

Making global report changes


The Report Writer also allows you to make changes that will be reflected in
reports throughout the accounting system. For example, most of the strings
that are displayed in reports can be modified. If you were to modify the
string ZIP Code and change it to be Postal Code, the change would be
seen in every report in which the string ZIP Code was used.

USERS

GUIDE

PA RT

B A S I C S

Terminology
To get the most benefit from the Report Writer, you need to understand
some basic terminology used to describe reports.

Original reports
An original report is one that was provided with the accounting system.
Original reports are stored in the main application dictionary.

Modified reports
A modified report is a copy of an original report that you have made changes
to. Modified reports are stored in the Reports dictionary. A modified report
can be substituted for an original report in the accounting system. When a
user prints the report, theyre actually using the modified report, rather
than the original.

Custom reports
A custom report is one that was created using the Report Writer. You can
start with a blank report, or you can start by making a copy of a report that
already exists in the accounting system. Custom reports are stored in the
Reports dictionary. You must use a special procedure to print custom
reports in the accounting system.

Storing reports
All changes and additions you make using the Report Writer are stored in
the reports dictionary for the application. By storing the new and modified
resources in a separate dictionary, the integrity of the system can be
maintained. For example, the following illustration shows the dictionary
for Microsoft Dynamics GP and its associated reports dictionary.
New and modified
resources are stored in
the reports dictionary.
Dynamics

Reports.dic

You will learn more about the reports dictionary in Chapter 30, Storing
Reports.

U S E R S

G U I D E

C H A P T E R

G ET T IN G

S T AR T E D

W IT H

TH E

R E P O R T

W R IT E R

Starting the Report Writer


To begin using the Report Writer, log into the accounting system. If youre
using Microsoft Dynamics GP in a multiuser environment, verify that no
other users are in the Report Writer and then perform the following steps:
1. Start the Report Writer.
From the main Dynamics GP window:
In the Microsoft Dynamics GP menu, choose Tools >> Customize >>
Report Writer.
From individual task windows:
In the Tools menu, choose Customize >> Report Writer.
If the Report Writer item is dimmed, you have not been granted access through
system security. Refer to Chapter 31, Accessing Reports, for more
information about setting access to the Report Writer.
2. Select the product to modify.
If youre using additional products that integrate with Microsoft
Dynamics GP, the following window will appear when you start the
Report Writer.
If you have integrating
products, use this window
to select the product
whose reports you want
to access.

Select the product whose reports you want to access, then click OK. If
Microsoft Dynamics GP is the only product available, this window
wont appear.

USERS

GUIDE

10

U S E R S

G U I D E

Chapter 2:

The Report Writer Interface


This portion of the documentation describes the basic elements of the
Report Writer interface. It is divided into the following sections:

The main window and toolbar


Menus
Windows
Standard buttons

The main window and toolbar


When you start the Report Writer, the Report Writers main window and
toolbar appear. The toolbar appears across the top of the main window.
Each button that appears represents a fundamental resource that you can
view or edit. The following table describes each button.
Button

Description
Opens the Data Types window, where you can view or edit
existing data types.
Opens the Fields window, where you can view a list of fields in
the application.
Opens the Tables or Virtual Tables window, where you can view
information about tables or virtual tables in the application.
Opens the Report Writer window, which allows you to create new
or modified reports.

Menus
The following items are available in the Report Writer menu bar.
File: Print Setup
This menu item opens the printer setup dialog box. This dialog box allows
you to configure the currently selected printer.
File: Generate Resource Reports
This menu item prints a resource report for the application. The resource
report is a text file that lists all resources in the current dictionary, their
internal resource IDs and any resources associated with the listed resource.
When you choose Generate Resource Reports, a dialog box will appear and
allow you to name the report and select its location.

USERS

GUIDE

11

PA RT

B A S I C S

File: Process Monitor


This menu option opens the Process Monitor window. This window
displays activity for tasks that you choose to process in the background
within your application.
File: <<Main Application Name>>
The name of this menu item changes based on the application being used.
Choosing the menu item allows you to exit the Report Writer and return to
the main application.
File: Table/Field/Window Descriptions
These menu items open forms in the Resource Descriptions tool. This tool
displays information about all the tables, fields and windows used in the
current dictionary.
File: Exit
This menu item allows you to exit the application.
Edit: Undo
This menu item will undo the last keyboard entry in an editable field. It will
also undo field movement and sizing in a layout window, but not the
addition or removal of fields, text or graphics from a layout window.
Edit: Cut/Copy/Paste
These menu items allow you to copy text or graphics to the Clipboard, then
paste it in a different location. You cannot cut, copy or paste fields.
Edit: Clear
This menu item allows you to remove text from an editable field, or remove
selected items from the layout area.
Edit: Select All
This menu item allows you to select the entire entry in a field, or all items in
the layout area for a report.
Macro: (all)
The items available from the Macro menu allow you to record and play
macros.
Resources: (all)
The items in the Resources menu allow you to access the various resources
in the application. Resources available from this menu include all resources
accessed from the toolbar, as well as other resources (such as formats and
strings).

12

U S E R S

G U I D E

C H A P T E R

T HE

R E PO R T

WR I T ER

IN T E R F AC E

Windows:
This menu displays a list of the windows currently open. Selecting a
window from this menu makes the window active.
Help: Lookup
This menu item opens any lookup window for the current field.
Help: Contents
This menu item displays the contents topic for the Report Writer online
help.
Help: Search for Help On
This menu item displays the search window for the help system, allowing
you to search the Report Writer online help.
Help: Window Help
This menu item displays help for the current window in the Report Writer.
Help: About
This menu item displays the About window for the main application.

Windows
The Report Writer uses several types of windows. Review the following
descriptions to learn how each is used.

Resource list windows


Resource list windows display a list of resource names for a given resource
type. To display a list window, click a button in the Report Writer toolbar or
choose a resource from the Resources menu. When the window appears,
select a resource name and click Open to display its definition window.

USERS

GUIDE

13

PA RT

B A S I C S

The following illustration shows the Formats resource list window.

Definition windows
Definition windows allow you to customize individual resources. For
example, you will use the Format Definition window to customize how
data is displayed on reports.

14

U S E R S

G U I D E

C H A P T E R

T HE

R E PO R T

WR I T ER

IN T E R F AC E

Layout window
You will use the Layout window to specify the layout of reports in the
application. The Layout window uses a graphics metaphor you may
already be familiar with: an assortment of tools you can use for drawing
and creating objects; a built-in grid that allows easy alignment of objects;
moveable objects in a layout like an object-oriented drawing program; and
standard cut-copy-and-paste techniques so you can import graphics you
create in other applications.

The Toolbox is available whenever the Layout window is open. It contains


tools you will use to add objects to the layout.

Standard buttons
The following buttons are used throughout the Report Writer:
Button

Description
Saves changes and closes the current window.

Closes the current window without saving the changes to


the window.
Creates a new resource.

Opens the selected resource and displays its definition.

USERS

GUIDE

15

PA RT

B A S I C S

Button

Description
Deletes the selected resource.

Allows you to insert items in a list, such as fields into a


sorting definition.
Allows you to remove items from a list, such as the fields
in a sorting definition.
The lookup button opens another window, allowing you
to select a value to return to the current field. Typically,
clicking the lookup button displays a list of resources.
One of these resources can be selected and have its value
returned to the current field.

16

U S E R S

G U I D E

PART 2: CREATING REPORTS

Part 2: Creating Reports


This portion of the documentation describes the various resources used to
create new reports. The following is a list of the topics discussed, along with
a brief explanation of each:

18

U S E R S

G U I D E

Chapter 3, Report Definition, describes how to use the Report


Definition window to define a new report.

Chapter 4, Report Layout, explains how to use the Report Layout


window to design the appearance of a report.

Chapter 5, Sorting, explains how to sort the data in a report.

Chapter 6, Restrictions, describes how to restrict what data appears


in a report.

Chapter 7, Calculated Fields, explains how to create and use


calculated fields in a report.

Chapter 8, Additional Headers and Footers, describes how to use


additional headers and footers to create groups for the report.

Chapter 9, Legends, explains how legends are used in reports.

Chapter 10, Modifying Fields, describes how to modify how fields


appear in a report.

Chapter 3:

Report Definition
Before you can work with the layout of a report, you must open an existing
report definition or create a new one. The report definition specifies
important characteristics of the report, such as its name. Many of these
characteristics can be adjusted after you begin designing the report layout.
Information about the report definition is divided into the following
sections:

Creating a new report definition


Report options
Printing a report definition

Creating a new report definition


Some of the items specified in the report definition include the name of the
report, whether any restrictions will be used to control the scope of the data
included when the report is generated, and which tables data presented in
the report will come from.
To create a new report definition, start the Report Writer. In the Report
Writer, click the Reports button on the toolbar to open the Report Writer
window. Click the New button to open the Report Definition window.

USERS

GUIDE

19

PA RT

C R E A TI N G

R E P O R T S

1. Name the report.


Enter a report name. Supply a name that accurately describes the
purpose of the report.
2. Select a report series.
Series assignments allow you to group related reports in the accounting
system using categories like Sales, Financial and Inventory. To ensure
the consistent use of series, its a good idea to use the series of the
primary table as the report series.
3. Select a main table for the report.
The name of each table in the current dictionary is displayed in the list
box below the Main Table field. From this list, select the table you want
to use as the main table for the report. The main table is typically the
table that contains the majority of information used by the report. Refer
to Chapter 11, Data Storage, for information about how to determine
which tables to use for your reports.
4. Add additional tables to the report (if necessary).
Data for the report may need to come from tables other than the main
table. If this is the case, you need to attach additional tables to the
report. To do this, click the Tables button to open the Report Table
Relationships window. The reports main table will be the only table
listed in this window. The number 01 will appear to the left of the table
name, denoting its status as the reports main table.
Refer to Chapter 12,
Table Relationships,
for more information
about creating table
relationships.

Click New to add another table to the report. The Related Tables
window will open. This window contains a list of all tables that have a
relationship with the main table already defined using the Table
Relationship Definition window. An asterisk appearing next to the
table name denotes a one-to-many relationship. Select the desired table
and click OK. Each table that is added to the report and is directly
linked to the main table will be listed below the main table in the
Report Table Relationships window, with a single dash to the left of the
table name.
To add a table that is linked to a table other than the main table, select
the secondary tables name in the Report Table Relationships window
and click New. Select the name of the table to be added and click OK.
This table will appear in the Report Table Relationships window below
the table that it is linked to, and will have two dashes to the left of its
name.

20

U S E R S

G U I D E

C H A P T E R

R EP O R T

D E FI N IT IO N

The following illustration of the Report Table Relationships window


shows the dashes that denote levels of linking.

Main table
The dashes indicate the level of
linking between the current table
and the main table. Two dashes
indicate that this table has a
relationship with the Customer
Master Summary table, which in
turn is related to the main table.

You can have only one one-to-many relationship among the tables used
for the report. For example, if the Customer Master Address File table
has a one-to-many relationship with another table used in the report, all
of the other relationships must be one-to-one.
Once you have added all the necessary additional tables, click Close to
close the Report Table Relationships window.
5. Set the maximum number of records for the report.
Use the Max Records field to restrict the number of records that will be
printed on the report. The default value for this field is 0, which
indicates that all records will be printed.
If you enter the number 10 in the Max Records field, for example, only
the first 10 records in the report will be printed, unless a restriction has
been created to specify another number. Any limit set using a
restriction overrides the limit set using the Max Records field.
You may want to enter a relatively small number while youre creating the
report, so that test reports will be generated more quickly. Be sure to change the
number to 0 or another appropriate number when you are finished testing.
What is an appropriate number depends upon the type of report and
how it will be used. For example, you could generate a report that lists
all sales statistics by salesperson. If the user will only want to view the
top ten salespersons, you could set the Max Records field to 10.

USERS

GUIDE

21

PA RT

C R E A TI N G

R E P O R T S

Report options
Several options are available to control characteristics of a report. Use the
following procedure to set options for the report.
1. Set the report format options.
These settings specify various characteristics of the report. The Format
Options are described in detail below.
Text Report Mark this option if you want to create a text report. Text
reports do not allow you to specify fonts or use graphical items in your
report, such as lines and pictures. However, text reports are less likely
to be adversely affected by different printer configurations.
We suggest you create graphics reports only when creating custom reports for
specific clients, where you can be sure of the type of printer the report will be
printed to. If you create graphics reports for general distribution, be sure to test
the reports with a wide variety of printers.
Skip Blank Records Mark this option to include only records for
which there is corresponding data in the main and related tables. If
there isnt a corresponding record in each of the related tables, the
entire record wont be included in the report.
Suppress Decimals Mark this option to round currency values to
the nearest whole currency unit. This option is primarily used for
international versions of applications where inflation makes the
fractional portions of currency amounts insignificant.
2. Set page orientation options.
You can specify the page orientation that will be used for the report.
Printer Setting Choose this option to use the page orientation as
specified for the printer currently selected.
Portrait Choose this option to have the report printed in portrait
mode, regardless of the current printer setting.
Landscape Choose this option to have the report printed in
landscape mode, regardless of the current printer setting.

22

U S E R S

G U I D E

C H A P T E R

Refer to Chapter 4,
Report Layout, for
more information
about the Report
Layout window.

R EP O R T

D E FI N IT IO N

3. Set text report options.


If you marked the Text Report option, you will activate the Text Report
Options portion of the Report Definition window. Marking this option
also changes the appearance of the Report Layout window, adding
vertical guides at the 80 and 132 character marks. These marks allow
you to count characters and more precisely place your field if you are
using a fixed text pitch. The text report options are described in detail
below.
Best Text Fit Choose this option to have the report printed using the
largest printer font that will allow all of the information to be printed
on the paper size and paper orientation specified for the printer to
which the report will be sent.
If youre creating a report in a dictionary that will be distributed to multiple
locations, selecting Best Text Fit will help ensure that the report will print
properly on the widest variety of printers.
17 Characters/Inch Choose this option to have the report print in
compressed text format.
10 Characters/Inch Choose this option to have the report print in
uncompressed text format.
Variable Characters/Inch Choose this option to be able to specify
the characters per inch on a line-by-line basis for the report.
Six Lines/Inch Choose this option to ensure that six lines of the
report will print in each inch of report height, regardless of which other
text option is selected.
This option is most useful when Best Text Fit is selected. It will prevent the
font from becoming too small when the text is compressed. The font will shrink
in width so that the entire report can be printed on the available paper, but no
more than six lines of text will be printed per vertical inch.

USERS

GUIDE

23

PA RT

C R E A TI N G

R E P O R T S

4. Set printing options.


Four printing option are available:
To access the Report
Section Options
window, open the
Report Layout window
and select Report
Section Options from
the Tools menu.

First Page Header Choose this option if you want the page header
to be printed on the first page of the report. If you dont want to print
page headers on any page of the report, use the Report Section Options
window to inactivate page headers. If page headers have been
inactivated, the Page Header check box will appear dimmed.
Last Page Footer Choose this option if you want the page footer to
print on the last page of the report. If you dont want to print page
footers on any page of the report, use the Report Section Options
window to inactivate page footers. If page footers have been
inactivated, the Page Footer check box will appear dimmed.
Preprinted Form Select this option to remove the built-in margin
from the layout area when designing a text report. With this option
selected, you can place fields anywhere in the layout area. However, if
you place fields outside of the printers predefined margins, data
outside of the margin will not print.
If Preprinted Form is not selected, a margin will appear in the report
layout area; the margin is drawn to show the default printer margins of
the currently-selected printer. The Report Writer will not allow you to
place fields outside of this margin.
If Preprinted Form is not selected and you lay out a report while you
have one printer selected, then save the report layout, select a different
printer and reopen the report layout, the margins may shift, depending
on the default margins of the new printer. If the margins shift, fields in
the layout area will shift with the left and top margins. This shift may
force fields outside of the area bounded by the right margin.
The Preprinted Form selection isnt available if the Best Text Fit option
is selected. The use of preprinted forms isnt an option when Best Text
Fit is selected because the size and spacing of the font used for Best Text
Fit reports varies based on the data in the report. Therefore, you can
never be certain that text will appear in the appropriate position on a
preprinted form.

24

U S E R S

G U I D E

C H A P T E R

R EP O R T

D E FI N IT IO N

Use RF for Last PF Mark this option to replace the last page footer
on the report with the report footer. The report footer will be printed in
the area designated for the page footer. If you mark this option, the
page footer and report footer must be the same size, and both sections
must be active.
To access the Footer
Options window, open
the Report Layout
window, select Report
Options from the Tools
menu, and click Add or
Open in the Additional
Footers section.

Mark this option if the report will contain totals in the report footer. For
instance, an invoice report containing invoice numbers, invoice items
and an additional footer could have a Sum type field in the additional
footer (which breaks on the invoice number field) to display the sum of
the invoice items. If you wish to display an overall sum at the bottom of
the report as well, you must place it in the report footer, then mark Use
RF For Last PF, as well as Suppress Last Records Footer in the Footer
Options window for the additional footer.

Printing a report definition


To keep track of the numerous options for a report, you may want to print
the report definition. To do this, select the report in the Modified Reports
list of the Report Writer window, and then click Print Definition. The Print
Report Definition window will appear.

Mark the options indicating what type of information you want included
on the report, and then click OK. The report will be generated.
Printing report definitions for existing reports is a good way to learn about the
report.

USERS

GUIDE

25

26

U S E R S

G U I D E

Chapter 4:

Report Layout
Once youve planned and defined your report, youre ready to design the
report layout. Use the information provided here to create a report layout
using the Report Layout window. Information about the report layout is
divided into the following sections:

Creating a report layout


Layout sections
The Toolbox
Adding fields to a report layout
The Properties window
Report properties
Field properties
Drawn object properties
Report field characteristics
Applying drawing options

Creating a report layout


Click the Layout button in the Report Definition window to access the
Report Layout window and its associated Toolbox. The Report Layout
window and Toolbox are shown in the following illustration.

Make a selection from this


drop-down list to view
calculated fields, global
variables, legends, or table
fields in this fields list.
Drag fields from this
fields list to the layout.

The Report Layout window will be displayed differently depending on


whether you are creating a graphics or text report. Changes affect the tools
shown in the Toolbox and the width of layout area.

USERS

GUIDE

27

PA RT

C R E A TI N G

R E P O R T S

Toolbox
The type of report being created is displayed in the Toolbox, next to the
arrow tool. Also, several tools are available only when creating graphics
reports, such as the line and picture tools.

Layout area
For a text report, the layout area includes a left border, a right border, and
two intermediate vertical guides. These guides mark the positions 80
characters and 132 characters from the left margin. They can help you more
precisely place fields in the layout area and are especially useful if youre
using a preprinted form and have specified a fixed-pitch text option. Then,
regardless of the printer printed to, you are assured of proper placement of
fields.
For graphics reports, the layout area simply includes the left and right
borders.
To make the various sections of the layout area easier to distinguish, you
can mark the Colorize Report Sections item in the Layout menu. This makes
the various sections of the report appear lightly shaded.

Layout sections
Before you can add fields and data to the report layout, you must decide
where to place that information in the layout area. The Report Layout
window for a new report contains four evenly-spaced blank sections,
separated by border lines. Each border has a handle in the left margin that
is labeled using a one- or two-letter abbreviation. Each section can be
resized by dragging the handle up or down. Once fields have been placed
in a section, you cant drag the lower border of a section above the lowest
field in the section.
Additional headers and
additional footers are
described in Chapter 8,
Additional Headers
and Footers.

28

U S E R S

G U I D E

Seven types of sections can appear in the Report Layout window,


depending on which options are selected in the Report Section Options
window. Once the Report Layout window has been opened, you can access
the Report Section Options window by choosing Report Section Options
from the Tools menu.

C H A P T E R

R E P O R T

L AY O U T

Each section is described in the following table.


Section

Use

Page Header
(PH)

Items in this section are placed at the top of every report page. Page number, date, and
time fields are commonly placed in this section of a report. You can prevent the Page
Header from being included on the first page of a report by unmarking the First Page
Header option in the Report Definition window.
To exclude page headers from a report, unmark the Page Header option in the Report
Section Options window.

Report Header
(RH)

Items in this section appear only on the first page of a report. The title of the report and
introductory information are often included in this section. If a page header is also
included on the first page, the report header will appear after the page header.
To exclude a report header from a report, unmark the Report Header option in the
Report Section Options window.

Additional Headers
(H1, H2, H3...)

Additional headers and footers allow you to create groupings in your report. Each
header will print when the data in the field it is based on changes. Therefore, the
sorting order used will affect the order in which the headers appear on the report. For
example, if the field related to header 2 is sorted before the field for header 1, header 2
will print before header 1.
Use the Report Section Options window to add additional headers. You can have up to
15 additional headers in a report.

Body (B)

The report body normally contains the bulk of the report. Depending on the number of
additional headers and the sorting order used, there could be a body section for each
additional header section.

Additional Footers
(F1, F2, F3...)

Additional headers and footers allow you to create groupings in your report. Footers
should correspond to headers and break on the same fields. They are often used to
display summary data, such as a total of all records in the reports body under the
footers related header.
Use the Report Section Options window to add additional footers. You can have up to
15 additional footers in a report.

Report Footer
(RF)

Items in this section appear only on the last page of a report. Summary information is
often included in this section. If a page footer is also included on the last page, the
report footer will appear before the page footer.
To exclude a report footer from a report, unmark the Report Footer option in the Report
Section Options window.

Page Footer
(PF)

Items in this section are placed at the bottom of every report page. This section often
includes administrative information, such as the name of the person running the
report. You can prevent this section from being included on the last page of a report by
unmarking the Last Page Footer option in the Report Definition window.
To exclude page footers from a report, unmark the Page Footer option in the Report
Section Options window.

USERS

GUIDE

29

PA RT

C R E A TI N G

R E P O R T S

The Toolbox
Use the Toolbox to place the fields and other items in the report layout area.
The Toolbox windows Layout and Arrange tabs let you toggle between
two different sets of tools. Tools in the Layout tab help you place
information in the layout area, while tools in the Arrange tab are used to
arrange selected items in the layout area.
To activate the Toolbox window, simply move the pointer from the Layout
window to the Toolbox window. The following illustration shows the
Toolbox for a graphical report when the Layout tab is displayed and a field
in the Layout area is selected. Each of the Layout and Arrange tools, as well
as the Pos and Size fields, are described in the following sections.

Use the Layout tab to


display the layout tools.

The Pos field displays the


coordinates of the
selected fields upper left
and lower right corners.

The report type is


displayed here.

The Size field displays the


total width and height of
the selected field.

The name of the table the


selected field came from, or
the field type appears here.

The layout tools


To use a layout tool, click the tools icon, then click in the layout area.
Tool

30

U S E R S

G U I D E

Name

Description

Arrow tool

Use the arrow tool to select objects in the layout area. When
you select an object, handles will appear; dragging a handle
allows you to resize the object. To select more than one
object at once, hold down the SHIFT key as you select the
object, or drag the arrow tool to draw a rectangle around the
set of objects you want to select. You can also use the arrow
tool to drag objects to a new position in the layout area.

C H A P T E R

Tool

R E P O R T

L AY O U T

Name

Description

Divider tool

Use the divider tool to divide the report into columns, such
as for printing labels. To mark a division on the report, click
the divider tool, then click in the body of the report where
you want to place the division. You must add the division to
the right of any existing fields; the division wont appear if
there are fields or other objects to the right of where youve
clicked. Once youve placed a division on the report, you
cant add any objects to the right of the division. You can
reposition a division by dragging it with the arrow tool.

Text tool

Use the text tool to place text in the layout area, such as a
report title or column headings. You can enter up to 79
characters in a text field. You cant use the ENTER key to make
the text wrap; this can only be accomplished by resizing the
text field.

Date tool

Use the date tool to add fields that display the current date.
The date is determined by the operating system setting.

Time tool

Use the time tool to add fields that display the current time.
The time is determined by the operating system setting.

Page number Use the page number tool to add fields that display the
tool
current page number.
Picture tool

The picture tool is available for use only with graphics


reports. It allows you to add pictures from your applications
picture library to a report. To add a picture to the report, click
the position in the layout area where the pictures upper left
corner should appear. The Pictures window will appear.
Select a picture and click OK; the picture will appear in the
layout area, where it can be moved or resized like any other
object. Refer to Chapter 20 for more information about the
picture library.
To add a picture to your applications picture library, select
Pictures from the Resources menu. Click New in the Pictures
window, and paste the desired picture in the Picture field of
the Picture Definition window. Name the picture and click OK
to save it.

Line tool

The line tool is available for use only with graphics reports.
Use it to draw lines in the report layout.

Circle tool

The circle tool is available for use only with graphics reports.
Use it to draw circles in the report layout.

Rounded
rectangle
tool

The rounded rectangle tool is available for use only with


graphics reports. Use it to draw rounded rectangles in the
report layout.

Rectangle
tool

The rectangle tool is available for use only with graphics


reports. Use it to draw rectangles in the report layout.

USERS

GUIDE

31

PA RT

C R E A TI N G

R E P O R T S

The arrange tools


Clicking the Arrange tab in the Toolbox displays an additional set of tools
used to align, resize, or tile fields in the window. These tools are described
in the following table.
Category
Align

Size

Tool

Name

Description

Align to Top

Aligns the selected objects with the top


object in the group.

Align to Left

Aligns the selected objects with the


leftmost object in the group.

Align to Right

Aligns the selected objects with the


rightmost object in the group.

Align to Bottom

Aligns the selected objects with the


bottom object in the group.

Size to Shortest

Shrinks the selected objects to the


height of the shortest object in the
group.

Size to Narrowest Shrinks the selected objects to the


width of the narrowest object in the
group.

Tile

32

U S E R S

G U I D E

Size to Widest

Enlarges the selected objects to the


width of the widest object in the group.

Size to Tallest

Enlarges the selected objects to the


height of the tallest object in the group.

Size to Default

Resizes the selected text object or field.


If the layout grid is active, resizes the
object to the nearest horizontal and
vertical grid lines. If the grid isnt active,
resizes the object to its default size
based on the drawing options for the
item.

Tile Horizontally

Tiles the selected objects horizontally.


The value in the Space field specifies
the space between objects.

Tile Vertically

Tiles the selected objects vertically. The


value in the Space field specifies the
space between objects.

C H A P T E R

R E P O R T

L AY O U T

Arranging objects cant be undone. Be sure to save your report layout before
arranging objects. If you arent satisfied with the result of an arrangement, you can
close the window without saving the changes.

The Pos and Size fields


These fields appear at the bottom of the Toolbox when a field is selected in
the layout area. The Pos field displays, in pixels, the coordinates of the
selected fields upper-left and lower-right corners. The Size field displays
the total width and height, in pixels, of the selected field. These fields are
automatically updated as you resize the selected field in the layout area,
allowing you to use the information displayed to exactly size a field.
If a table field is selected, the name of the table from which the field was
selected will appear below the Size field. If the selected field is a global
variable, calculated field, or legend, the resource type (Global, Calculated
Field, or Legend) will appear below the Size field.

Adding fields to a report layout


For more information
about legends, refer to
Chapter 9, Legends.

When you open the Report Layout window, the name of the reports main
table will appear under the layout tools in a drop-down list, and the name
of each field in that table will appear in the fields list. You can change which
fields appear in the fields list by selecting a different entry from the list. The
choices in the drop-down list are Globals, Calculated Fields, Legends, and
the name of each table associated with the report.
The arrow tool is selected by default when you open the window. Use it to
select each desired field from the fields list and drag it to the report layout
area. If you inadvertently drag the wrong field to the layout area, select the
field using the arrow key, then press DELETE or BACKSPACE. This will remove
the field from the layout area without affecting the field in the table.
Refer to Part 3, Gathering Data, for information about finding the data you want
to include in your report.
If you add an array field to the layout, the Report Field Options window
will appear, allowing you to specify the element of the field being placed on
the report. In the Array Index field, enter the number of the array element,
and then click OK. If necessary, you can use the Report Field Options
window to change the array index to a different element of the array.
Fields placed in the layout area will automatically appear sized according
to the maximum keyable length of the field. You can resize each field as you
wish; however, if you shorten a field, the information in that field may not

USERS

GUIDE

33

PA RT

C R E A TI N G

R E P O R T S

be displayed in its entirety when the report is printed. If you resize a field
by vertically enlarging it, the fields text will be centered. If you reduce a
fields height, it will not display properly.
You can click and drag with the Arrow tool to select multiple fields in the
layout. By default, the selection rectangle will be limited to the current
group. Hold down the CTRL key to allow the selection rectangle to expand
beyond the current group.
In general, fields placed in the body of the report should be placed at the
very top of the body section, since any white space between the top of the
body and the field below it will be repeated for every record thats printed.
Similarly, once youve finished placing fields in the report body, you should
resize the body section so that excess space is removed from the bottom of
the section.

The Properties window


The Properties window is used to display and set several characteristics of a
report and the objects in the report. To display the properties for the report,
select Properties from the Layout menu. If it isnt already open, the
Properties window will appear.
Select an object in the layout area and click the tab indicating which type of
property you want to view. Select Object or Visual. To set a property, select
it in the list and then change its value in the settings box.

Click a tab to display the


corresponding list of
properties.
To set the value of a
property, select it in the
list. Then set its value in
the settings box.

34

U S E R S

G U I D E

Settings box

C H A P T E R

R E P O R T

L AY O U T

Setting the property value involves choosing a value from a drop-down list,
typing a value, or using a lookup. Some properties listed cant have their
values changed.
Property type

Description
Some properties are set using a dropdown list.
Some properties have the value entered
directly.
Some properties use a lookup to retrieve
values.
Some properties cant be set.

Double-clicking a property in the properties list is a shortcut to setting its value.


For instance, double-clicking a property whose value is set with a drop-down list
will set the property to the next value in the list.

Report properties
To view report properties, be sure the Properties window is open. Select the
arrow tool from the Toolbox and click anywhere in the background of the
layout area to select the report. The following table lists the report
properties.
Object
property

Description

DisplayName
MainTable
MainTableKey

The name displayed for the report at runtime.


The primary table from which data will be read for the report.
The key from the main table that will be used to determine the
default sorting order for the report. An alternative sorting order
can be defined using the Sorting Definition window.
The display name for the main table selected for the report.
Specifies the number of records that will be printed on the report.
For example, the value 10 indicates only the first 10 records will be
printed. The default value is 0, which indicates that all records will
be printed.
The name of the report.
Specifies the page orientation that will be used for the report.
Printer Setting will use the orientation for the printer currently
selected. Portrait will always use portrait orientation. Landscape
will always use landscape orientation.
Lists the resource ID of the report.
Indicates the series the report is assigned to.
Indicates what type the report is. It can be one of the following:
Graphics, Text, or Text (Variable CPI).

MainTableName
MaxRecords

Name
Orientation

ReportID
Series
Type

USERS

GUIDE

35

PA RT

C R E A TI N G

R E P O R T S

Field properties
The following table lists the field properties.
Object
property

Description

ArrayIndex

Specifies which element of an array field or legend to display on


the report.
Specifies how the data in a field will be displayed on a report.
Most fields on a report use the Data display type. Refer to
Changing display types on page 82 for more information.
Indicates the table field or calculated field being used on the
report, and allows you to view or edit the characteristics of the
field definition.
Indicates the resource ID of the field.
Indicates whether the field is a table field, calculated field, global
field, or a legend.
Displays the name of the format applied to the field.
Displays the name of the field that contains the integer value
specifying the format to use. Refer to Specifying a format field on
page 81 for more information.
Indicates whether the format field is a table field or a calculated
field. For table fields, the name of the table containing the field is
displayed.
Indicates which section of the report the selected field is located
in.
For table fields, displays the technical name of the table the
selected field is part of.
For table fields, displays the display name of the table the selected
field is part of.

DisplayType

Field

FieldID
FieldType
Format
FormatField

FormatFieldSrc

Section
Table
TableName

Visual
property

Description

Alignment
BackColor
Font
FontBold
FontColor
FontItalic
FontSize

Specifies whether the item is left-, center-, or right-aligned.


Specifies the background color of the field.
Specifies the font to use for the field.
If set to true, the field text will be displayed in bold type.
Specifies the color of the text for the field.
If set to true, the field text will be displayed in italic type.
Specifies the size of the text, in points, for the text displayed in the
field.
If set to true, the field text will be underlined.
Specifies the pattern to apply to the background.
Specifies the color of the pattern that is applied to the background.
Indicates the position of the left edge of the field, measured in
points from the left edge of the report.

FontUnderline
Pattern
PatternColor
Position-Left

36

U S E R S

G U I D E

C H A P T E R

R E P O R T

L AY O U T

Visual
property

Description

Position-Top

Indicates the position of the top edge of the field, measured in


points from the top edge of the report.
Indicates the field height, measured in points.
Indicates the field width, measured in points.
Indicates conditions when the field will be printed on the report. It
can be one of the following: Visible, Invisible, or Hide When
Empty.

Size-Height
Size-Width
Visibility

Drawn object properties


The following table lists the drawn object properties.
Object
property

Description

Section

Indicates which section of the report the selected drawn object is


located in.

Visual
property

Description

Alignment

For static text, indicates whether the text is left, center, or rightaligned.
Specifies the background color of the object.
Specifies the font used for static text.
If set to true, static text will be displayed in bold type.
For static text, specifies the color of the text.
If set to true, static text will be displayed in italic type.
For static text, specifies the size of the text, in points.
If set to true, static text will be underlined.
Specifies the color of the line used to draw the object.
Specifies the width of the line (in pixels) used to draw the object.
Specifies the pattern to apply to the background.
Specifies the color of the pattern that is applied to the background.
Indicates the position of the left edge of the object, measured in
points from the left edge of the report.
Indicates the position of the top edge of the object, measured in
points from the top edge of the report.
Specifies the shape of an item drawn with the shape tool.
Indicates the object height, measured in points.
Indicates the object width, measured in points.

BackColor
Font
FontBold
FontColor
FontItalic
FontSize
FontUnderline
LineColor
LineSize
Pattern
PatternColor
Position-Left
Position-Top
Shape
Size-Height
Size-Width

USERS

GUIDE

37

PA RT

C R E A TI N G

R E P O R T S

Report field characteristics


When printed on a report, most fields you add to a report layout simply
display the data values stored by them. However, some fields have special
display characteristics you need to be aware of when you use them in a
report.

Booleans
When a boolean is added to a report, the string Yes is printed on the
report if the field contains the value true. The string No is printed on
the report if the field contains the value false.

Check boxes
When a check box is added to a report, an X is printed if the check box is
marked. Nothing is printed on the report if the check box is not marked.

Combo boxes
When a combo box field is added to a report, the text string selected or
entered in the field is printed on the report.

Dates
When a date field is added to a report, the short version of the date value is
printed on the report. The date value is formatted based on the regional
settings for the operating system.

Drop-down lists
When a drop-down list field is added to a report, the static text value
corresponding to the fields value is printed on the report. If the drop-down
list field doesnt have any static text items defined for its data type, no text
is displayed on the report. In this case, you must create a calculated field to
display a value based on the value of the drop-down list field.

List boxes
When a list box field is added to a report, the static text value
corresponding to the fields value is printed on the report. If the list box
field doesnt have any static text items defined for its data type, no text is
printed on the report. In this case, you must create a calculated field to
display a value based on the value of the list box field.

Multi-select list boxes


When a multi-select list field is added to a report, the static text values
corresponding to the items selected in the field are printed on the report. If
the multi-select list box field doesnt have any static text items defined for
its data type, no text is printed on the report.

38

U S E R S

G U I D E

C H A P T E R

R E P O R T

L AY O U T

Pictures
Picture fields should not be added to the report layout.

Radio groups
When a radio group is added to a report, the integer value of the field is
printed on the report. If you want to display some other value in the report,
you must create a calculated field to display a value based on the value of
the radio group field.

Text fields
When you add text fields to a report layout, you should be aware that they
can display no more than 10K of data, even though text fields can hold up
to 32K of data. Text fields should only be placed in the body of a report.
Resizing a text field will have different results, depending on whether
the report is a graphics or text report. If you resize a text field in a graphics
report, data will be printed to fill the resized area. However, if the text field
is larger than the amount of data in that field for a given record, the unused
space for that field will still be included in the report. If you resize a text
field in a text report, the field width you specify will be used, but the field
height will be adjusted automatically to accommodate the text in the text
field, up to the 10K limit.
For example, you could resize a text field to be two inches wide and tall
enough to include 18 rows of data. If the data in that field for a given record
will fill only 12 rows, then only those 12 rows will be included if its a text
report, while those 12 rows plus 6 blank rows will be included if its a
graphics report. Similarly, if the data in that same field for a different record
contains 20K of data, up to 10K will be included if its a text report, while
only the first 18 rows will be included if its a graphics report.

Times
When a time field is added to a report, the time value is printed on the
report. The time value is formatted based on the regional settings for the
operating system.

Visual switches
If the visual switch field has static text values defined, the static text value
corresponding to the fields value is printed on the report. If the visual
switch field has picture or native picture static values defined, the integer
value of the field is printed on the report. If the visual switch field has no
static values defined, it cant be used on the report. Instead, you must create
a calculated field to display a value based on the value of the visual switch
field.

USERS

GUIDE

39

PA RT

C R E A TI N G

R E P O R T S

Applying drawing options


Use the Drawing Options window to select a variety of fonts, font styles,
colors and fill patterns for items in graphics reports. To open the Drawing
Options window, select an item in the layout and choosing Report Drawing
Options from the Tools menu.

If several items are selected in the layout area when you open the Drawing
Options window, the options you specify will apply to all of them. If no
items are selected when you open this window, the options defined will be
applied to all new objects placed in the layout area.
For many objects, such as text, lines, and rectangles, you can open the Drawing
Options window by double-clicking the object.

Fonts
Use items in the Font section to specify font characteristics for items in the
report. For graphics reports, you can choose any font installed on the
current system.
Keep in mind that if the report is used on another system that doesnt have the
appropriate fonts installed, the missing fonts will be substituted.
Three generic fonts are always available for every report. These are:

40

U S E R S

G U I D E

Courier (generic)
Helvetica (generic)
Times (generic)

C H A P T E R

R E P O R T

L AY O U T

These fonts correspond to the fonts that were available in earlier versions of
the Report Writer. If you want your reports to be independent of the fonts
installed on a particular system, use these generic fonts.
If you are creating a text report and have marked the Variable Characters/
Inch option in the report definition, the Font section in the Drawing
Options window allows you to specify the characters per inch to use for
each line. Simply select a field in the line and display the Drawing Options
window. You can choose 5, 6, 10, 12, or 17 characters per inch.
If you mark the Variable
Characters/Inch option for a
text report, you can specify
the characters per inch for
each line of the report.

Once you set the characters per inch for a field on the report, any other field
you move to that line will also be printed in that size. To see how your text
report will appear when printed, be sure the Show Field Names item in the
Layout menu is not marked. The report will be displayed as it will appear
when printed.

Patterns
Use the Patterns section to select the fill pattern for fields, text items or
shapes in the layout.

Color
Use the Color section to select the font/line, background and foreground
colors of items youve added to the layout. The line color is used for lines
and field borders. The font color is used for text. The foreground color is
used to draw the pattern selected in the Patterns section. The background
color is used to fill in the remaining area of the object. The line size specifies
the size of the line used to draw lines, rectangles, circles, and other shapes.
When specifying colors, you can select one of the predefined colors in the
list. To use a custom color, select User Defined as the color and then click
More Colors to display the Color dialog. Select a color and click OK. The
color you selected will be applied to the current color selection.

Alignment
Use the Alignment setting to specify the horizontal alignment of text in
fields or of text items youve added using the text tool.

USERS

GUIDE

41

42

U S E R S

G U I D E

Chapter 5:

Sorting
There are two methods for specifying how the data in a report is sorted. In
the first method, the report is sorted based on a key you select for the main
table used for the report. In the second method, you create a sorting
definition based on the fields in the tables used for the report. Information
about sorting is divided into the following sections:

Using a main table key


Creating a sorting definition

Using a main table key


The primary method of sorting a report is to select a key from the main
table for the report. You specify the main table and a key from that table
when you use the Report Definition window to create the definition for a
report. The data in the report is sorted based on the key you select.

The report data is sorted


based on this key selected
from the main table.

This is the preferred method for sorting the report, because an index
already exists for each table key. In effect, the order of the data is already
known. The Report Writer simply retrieves data from the primary table
using the key you specified.

Creating a sorting definition


In some cases, there isnt an appropriate key available to sort the report data
the way you would like. In this situation, you must create a sorting
definition. A sorting definition defines how you want to sort the report data.
It is based on fields in the tables associated with the report. Using a sorting
definition is a less-efficient method for sorting the report, because the
Report Writer must read through each table used by the report to find the
appropriate records to use. For optimal performance, you should use a
sorting definition only when necessary.

USERS

GUIDE

43

PA RT

C R E A TI N G

R E P O R T S

To create a sorting definition, click the Sort button in the Report Definition
window to open the Sorting Definition window, shown in the following
illustration. Use this window to define a sorting order that includes fields
from any of the tables associated with the report.

The report will be


sorted based on the
fields in this list.

From the Report Table drop-down list, select the table containing the field
you wish to use to specify the sorting order. The name of each field in the
selected table will appear in the Table Fields list. Select the desired field,
and click Insert. The field name will be added to the Sort By list.
Subsequently-added fields will be added to the top of the Sort By list, unless
an item in the list is selected. If an item is selected, newly-added fields will
be added below the selected item.
The sorting order will be based on the fields listed in the Sort By list. The
data will be sorted based on the first field, then, if a secondary sorting order
is needed, the second field, and so on. Be sure to include all fields necessary
to fully define the desired order.
For each field selected, you can specify whether you want the data to be
sorted in ascending or descending order (ascending is the default order)
and whether to ignore the case of any string fields used as sorting criteria. If
you ignore case, the strings will be sorted in strict alphabetical order. If you
dont ignore case and you are sorting in ascending order, all strings
beginning with lowercase letters will appear in alphabetical order, followed
by all strings beginning with uppercase letters, also in alphabetical order. In
descending order, all of the uppercase strings will appear before the
lowercase strings.

44

U S E R S

G U I D E

C H A P T E R

S O R T I N G

To select the Descending and/or Ignore Case options for a given field, select
the desired field in the Sort By list and check the appropriate sorting
options. Once you have specified all the sorting options, click OK to close
the Sorting Definition window.
If none of the fields used to define the sorting order are from a secondary table, the
report information drawn from that table will be sorted according to the key used to
define that secondary tables relationship with the reports main table.
Once you have created a sorting definition for a report, it will override the
sort order specified by the key selected for the reports main table. To use
the main tables key as the sorting method, you must remove all of the
items from the Sort By list in the Sorting Definition window.

USERS

GUIDE

45

46

U S E R S

G U I D E

Chapter 6:

Restrictions
Use restrictions to limit the amount and scope of data included in your
report. For example, you could create a report with a restriction based upon
the State field, so that the report will contain only sales data for a specific
state.
Information about restrictions is divided into the following sections:

Defining report restrictions


Restriction functions

Defining report restrictions


To add restrictions to an existing report definition, use the following
procedure. In the Report Writer window, select the name of the desired
report and click Open to open the Report Definition window. Click the
Restrictions button to open the Report Restrictions window. Click New to
open the Report Restriction Definition window and define a new report
restriction. The Report Restriction Definition window is shown in the
following illustration.

Before defining a restriction, its a good idea to plan the restriction and write it out
completely. Decide which fields, operators, constants and functions youll need to
express the restriction properly. Some restrictions may require that the steps
defined below be performed in a slightly different order.

USERS

GUIDE

47

PA RT

C R E A TI N G

R E P O R T S

1. Name the restriction.


Enter a name in the Restriction Name field. The name can be up to 79
characters long.
2. Select the appropriate function, if any.
If the restriction you are defining uses a system-defined function, the
function must be included in the expression before the field it is applied
to. For example, to restrict the Customer Order report so that it lists
only customers that ordered more than five items, you could use the
following restriction on the Item_Number field:
FREQUENCY (Item_Number) > 5

For a detailed description of each function available for use when


defining a restriction, refer to Restriction functions on page 49.
3. Specify the field to restrict on.
From the Report Table drop-down list, select the table containing the
field on which you want to restrict the report. Once the appropriate
table is selected, select the desired field from the Table Fields dropdown list. Click Add Field to add the selected field to the Restriction
Expression.
4. Select the appropriate operator.
From the Operators section, select the appropriate operator. It will
automatically be added to the Restriction Expression field. These are
the same operators described in Operators on page 59 with the
exception that the concatenation operator is not available for use with
restrictions.
5. Specify the constant to be used in the restriction.
From the Type drop-down list in the Constants section, select a control
type for the constant you are defining. The five supported control types
for constants in restriction expressions are integer, currency, string,
date, and time. Once youve selected the constants control type, enter
the desired value in the Constant field and click Add Constant.
6. Verify the restriction expression and save it.
Review the contents of the Restriction Expression field. If any part of
the expression is incorrect, highlight the incorrect value and click
Remove. Replace the removed value, if necessary. Once the restriction
expression is correct, click OK to save the restriction and close the
Report Restrictions window.

48

U S E R S

G U I D E

C H A PT E R

R E S T R I C TI O N S

Restriction functions
This section describes the functions available when defining a restriction for
a report. It includes a definition of each function, an example of how the
function is used in a restriction expression, and an explanation of how you
can use such an expression in a report. Also included is information about
the storage types that can be used with each function, since some functions
can be used only in expressions with fields of a certain storage type.
SUBSTRING and
WILDCARD are the
only functions that can
be used with table
fields from all report
tables.

Most of these functions can be used only with fields from a report table that
has a one-to-many relationship with another report table, such as a
secondary table with a one-to-many relationship with the reports main
table. Records in secondary tables with a one-to-many relationship with the
main table are sometimes referred to as detail records. Using one of these
functions with any other fields will cause an error at runtime. Only two
functions can be use with fields from any of the report tables: SUBSTRING
and WILDCARD.

AVERAGE
The AVERAGE function calculates the average of an expression for all
detail records. It can be used with expressions containing fields of all
storage types except strings.

Example
You can use the AVERAGE function to create a restriction on an invoice list
so that it will print only invoices for which the invoices items average a
markup of at least 20% over cost.
AVERAGE ((Item Price) (Item Cost) / (Item Cost)) > .2

USERS

GUIDE

49

PA RT

C R E A TI N G

R E P O R T S

EXISTS
The EXISTS function ascertains whether at least one record in a group of
detail records makes the expression true. The expression the EXISTS
function evaluates should be a comparison as shown in the following
example. This function can be used with all boolean expressions.
You can use the NOT operator with this function to increase its scope and
create expressions restricting the information on your reports according to
expressions that arent true.

Example
You can use the EXISTS function to create a restriction on an order list to list
customers whose orders include at least one item over $100.
EXISTS (Item Price > 100)

Unlike other functions, EXISTS and FORALL must be used to evaluate an


expression where the comparison operator is inside parentheses, as shown. This
causes the function to evaluate the entire expression, rather than only the item
following it.

FIRST
The FIRST function finds the first occurrence of an expression in a group of
detail records. It can be used with expressions containing fields of any
storage type.
Restrictions are evaluated before the report is sorted, so the item designated
by the FIRST function may not be the same as the first item in a group on
the report once its been sorted and printed. The first item will be the first
value in the table, sorted by the key used to link the secondary table to the
reports main table.
For example, you could print a report that lists invoices and corresponding
line items, then create a restriction to print only invoices for which the
first line items price was more than $1,000. If you then sort the report in
ascending order by line item price, the line item that the FIRST function
finds wont necessarily be the line item listed first on the report. It will be
the first line item in the table, which depends on the key used to create the
table relationship. If the key is composed of the invoice number and the line
item number, the first line item will be the item with the smallest (or largest,
depending upon the keys sorting method) line item number.

50

U S E R S

G U I D E

C H A PT E R

R E S T R I C TI O N S

The following example shows an invoice and its line items as theyre sorted
within the tables, by invoice number and by item number.
Records in the table are
sorted by the Invoice
Number and Item.
This is the record the FIRST
function will evaluate.

Invoice Number

Item

Price

5005

1201

$5,300.00

5005

1205

$3,900.00

5005

1211

$5,250.00

Since the line items are sorted by item and not by price, the record
identified by the FIRST function is item 1201. If you sort the report by the
price of each line item, thats how the information will appear on the report,
but the FIRST function will still identify item 1201 as the first item.
Invoice 5005

Records on the report are


sorted by the Price.

Item

Price

1205

$3,900.00

1211

$5,250.00

1201

$5,300.00

Example
The following example shows how to use the function to create the
expression explained in the previous paragraphs and illustrations.
FIRST (Item) > 1000

USERS

GUIDE

51

PA RT

C R E A TI N G

R E P O R T S

FORALL
The FORALL function prints only those records for which all of the detail
records meet the expressions requirements. This function can be used with
all boolean expressions.
You can use the NOT operator with this function to increase its scope and
create expressions restricting the information on your reports according to
expressions that arent true.

Example
You can use the FORALL function to create a restriction on an invoice list to
display only invoices containing items that all cost more than $500.
FORALL ((Item Price) > 500)

Unlike other functions, EXISTS and FORALL must be used to evaluate an


expression where the comparison operator is inside parentheses, as shown. This
causes the function to evaluate the entire expression, rather than only the item
following it.

FREQUENCY
The FREQUENCY function counts the number of detail records. The
FREQUENCY function can be used with expressions containing fields of
any storage type.

Example
You can create a restriction on a customer order list to print only orders
containing more than five items.
FREQUENCY (Item Number) > 5

LAST
The LAST function finds the last occurrence of an expression in a group of
detail records. The LAST function can be used with expressions containing
fields of any storage type except string.
Restrictions are evaluated before the report is sorted, so the item designated
by the LAST function may not be the same as the last item in a group on the
report once its been sorted and printed. The last item will be the last value
in the table, sorted by the key used to link the secondary table to the
reports main table.

52

U S E R S

G U I D E

C H A PT E R

The LAST function


performs much like the
FIRST function. For
more information,
refer to the description
of the FIRST function
earlier in this section.

R E S T R I C TI O N S

For example, you could print a report that lists Salesperson IDs and
corresponding line items containing dates upon which theyve made sales
and the total amount of each sale. You could then create a restriction to
print only the records for salespeople whose most recent sale totaled more
than $1,000. If you then sort the report in ascending order by the amount of
the sale, the record that the LAST function finds wont necessarily be the
one listed last on the report. The last record on the report will be the item
with the largest total sale amount.
The following example shows the records for Salesperson ID 001 as theyre
sorted within the tables, by salesperson ID and sale date.

Records in the table are


sorted by the Salesperson
ID and Sale Date.

This is the record the LAST


function will evaluate.

Salesperson ID

Sale Date

Sale Total

001

1/2/97

$1,200.00

001

2/4/97

$2,300.00

001

2/6/97

$1,400.00

001

4/12/97

$1,000.01

Since the salesperson records are sorted by sale date and not by sale total,
the record identified by the LAST function is the 4/12/97 sale. If you sort
the report by the sale total, that is how the information will appear on the
report, but the LAST function will still identify the 4/12/97 sale as the last
item.
Salesperson ID 001

Records on the report are


sorted by the Sale Total.

Sale Date

Sale Total

4/12/97

$1,000.01

1/2/97

$1,200.00

2/6/97

$1,400.00

2/4/97

$2,300.00

Example
The following example shows how to use the function to create the
expression explained in the previous paragraphs and illustrations.
LAST (Sale Total) > 1000

USERS

GUIDE

53

PA RT

C R E A TI N G

R E P O R T S

MAXIMUM
The MAXIMUM function finds the detail record with the highest value that
satisfies the given expression. The MAXIMUM function can be used with
fields of any storage type except strings.

Example
You could create a restriction on an invoice list that prints only invoices that
include items priced over $100.
MAXIMUM (Item Price) > 100

MINIMUM
The MINIMUM function finds the detail record with the lowest value that
satisfies the given expression. The MINIMUM function can be used with
fields of any storage type except strings.

Example
You could create a restriction on an invoice list that prints only invoices that
include items priced under $100.
MINIMUM (Item Price) < 100

SUBSTRING
The SUBSTRING function is used to search fields with a string storage type
for a match to a specified pattern. The SUBSTRING function will find a
match if the specified pattern appears anywhere within the specified field.
It is case-sensitive.
Only the equality (=) and inequality (<>) operators can be used with the
SUBSTRING function. The data in the specified field either matches or
doesnt match the pattern. No other operators can be used.
This function is used to restrict the data on the report to information that
matches a set of characters specified as the search pattern. Three special
characters can be used in the search pattern to indicate the type of match
youre searching for: the asterisk (*), the question mark (?), and the
backslash (\).

54

U S E R S

G U I D E

C H A PT E R

R E S T R I C TI O N S

These characters are described in the following table.


Character

Matching search results

Any character
A group of characters
No characters

Any single character

Used in front of special characters so they can be treated as part of


the search pattern

The SUBSTRING function implicitly adds an asterisk to the beginning and


end of the pattern you specify, so that a match will be found even if the
pattern occurs within the information in the field. For example, the
SUBSTRING function would find a match for the pattern P*L in the word
APPLE, while the WILDCARD function wouldnt.
The backslash is used in front of special characters, such as quotation
marks, that have specific meaning in Report Writer. A quotation mark
indicates the beginning or end of a field. If you wish to search for fields
containing, among other characters, a quotation mark, youll need to place
a backslash in front of it to indicate that the quotation mark is simply a
character, and not the sign for the end of the field. Most symbols and nonalphanumeric characters are special characters and should be used with
backslashes.

Example
You could use this function to print a list of companies in a particular sales
region whose names contain the string Johns. The following example
shows an expression for which Johns Fish Market and Mabel and Johns
Deli would both be valid matches.
SUBSTRING ("John\'s") = Company_Name

USERS

GUIDE

55

PA RT

C R E A TI N G

R E P O R T S

SUMMATION
The SUMMATION function calculates the sum of a specified expression for
each record in a set of detail records. The SUMMATION function can be
used with fields of any storage type except strings.

Example
You can use the SUMMATION function on a report listing invoices and the
items on each invoice to print only the invoices where the total of all item
extended prices is greater than $1,000. The extended price is the price of
each item multiplied by the number of items that were purchased. The
SUMMATION function would first calculate the extended price for each
item on the invoice, then sum those extended prices and compare the sum
to the specified $1,000 value. The following expression demonstrates how
this restriction would be written.
SUMMATION (Quantity Ordered * Item Price) > 1,000

WILDCARD
The WILDCARD function is used to search fields with a string storage type
for a match to a specified pattern. The WILDCARD function will find a
match only if the specified pattern appears in the specified field exactly as
stated. The asterisk, question mark and backslash special characters,
described in the explanation of the SUBSTRING function, can also be used
with this function.
By using these special characters, you can expand the scope of the search
conducted by the WILDCARD function. Without the special characters, the
specified field must contain exactly the specified pattern, and only the
specified pattern, for a match to occur. For example, the expression
WILDCARD (Apple) = Snack Type would not find a match if the value in
the Snack Type field was Apples.
Only the equality (=) and inequality (<>) operators can be used with the
WILDCARD function. The data in the specified field either matches or
doesnt match the pattern. No other operators can be used.
The WILDCARD function is case-sensitive.

Example
You could use this function to print a list of users whose IDs begin with the
letter A.
WILDCARD ("A*") = User ID

56

U S E R S

G U I D E

Chapter 7:

Calculated Fields
Calculated fields are a powerful tool you can use to manipulate data in
your report. Calculated fields are defined using fields, constants and
operators, as well as system-defined or user-defined functions. The
following illustration shows the Calculated Field Definition window.

A calculated field is based on either a conditional expression or a calculated


expression. A conditional expression allows you to print one value or another,
depending on the result of a boolean expression. A calculated expression
allows you to print the result of an expression, such as the sum of several
currency fields, or the concatenation of several string fields.
The result of a calculated field must be an integer, currency, variable
currency, string, or date value. You can use time fields or constants in a
conditional expression, but the result printed based on that conditional
expression must be an integer, currency, string, or date. For example, you
could compare the value of a time field to a time constant to determine
whether to print the string Morning or the string Afternoon.
When defining an expression for a calculated field, the expression cant be
typed in directly. Instead, the expression must be built by adding the
elements to the expression from the Fields, Constants, or Functions tabs and
the Operators keypads.

USERS

GUIDE

57

PA RT

C R E A TI N G

R E P O R T S

Information about calculated fields is divided into the following sections:

Creating a calculated field


Operators
Fields tab
Constants tab
Functions tab
System-defined functions
User-defined functions

Creating a calculated field


Follow these steps to create a new calculated field for your report:
Click the Reports button on the toolbar. In the Report Writer window, select
and open a report definition. Click Layout in the Report Definition window.
The Report Layout and Toolbox window will open. From the Layout tab in
the Toolbox window select Calculated Fields from the drop-down list, then
click New.
1. Name the calculated field.
The calculated field name can be up to 79 characters long.
2. Select the result type.
This is the storage type that will be used for the value the calculated
field produces. For example, if the calculated field is a calculated
expression that concatenates two string fields, the result type must be a
string.
If the calculated field is based upon a conditional expression, both the
True Case and False Case values must be of the same storage type as the
result type.
3. Select the type of expression.
Calculated is selected by default. If you select Conditional, nine
additional boolean operators will be enabled in the Operators section;
the True Case and False Case fields will also be enabled.
The options under
each tab, and the
usage for each operator are described in the
following sections.

58

U S E R S

G U I D E

4. Define the expression.


Select each element to be included in the expression from the
appropriate tab (Fields, Constants, or Functions). Click Add to place the
selected element in the currently-highlighted position within the
expression. Add the appropriate operators to the expression as needed.

C H A P T E R

C AL C U LA T ED

F IE LD S

5. Define conditional values.


If this calculated field is based on a conditional expression, define the
True Case and False Case values. One of these values will be printed in
the calculated field on the report, depending on whether the expression
defined is true or false.
6. Save your entry.
Click OK to save the calculated field and return to the Report Layout
window.

Operators
Operators allow you to specify the relationships between the various
components of expressions. Some operators are only enabled if you are
creating a conditional expression.

Parentheses ()
Indicate the beginning and end of an expression that should be evaluated as
a unit, separate from the rest of the expression. In general, you should use
parentheses to enclose parts of the whole expression when youre using two
or more operators and you wish to control the order of evaluation.
Parentheses are automatically added to an expression when you insert a
function. The item following it, usually a field, is automatically placed
within the parentheses.

Addition (+)
Adds the value to the left of the addition operator to the value to the right
of the operator.

Subtraction (-)
Subtracts the value to the right of the operator from the value to the left of
the operator.

Multiplication (*)
Multiplies the value to the left of the operator by the value to the right of
the operator.

Division (/)
Divides the value to the left of the operator by the value to the right of the
operator.

USERS

GUIDE

59

PA RT

C R E A TI N G

R E P O R T S

CAT
Joins the data in two fields with a string storage type into one string of
characters. CAT stands for concatenate, and is symbolized by the pound
(#) sign when displayed in an expression. You may want to use the CAT
operator in conjunction with the STRIP function so that only the data in
each field is displayed, and not empty blanks following the data.
The following operators are enabled only when youre creating conditional
expressions.

Equality (=)
Indicates that if the two values to either side of the operator are equal, the
expression is true.

Inequality (<>)
Indicates that if the values to either side of the operator arent equal, the
expression is true.

AND
Joins a series of expressions within a conditional expression. All of the
expressions joined by an AND operator must be true for the entire
expression to be true.

Greater than or equal to (>=)


Indicates that if the value to the left of the operator is greater than or equal
to the value to the right of the operator, the expression is true.

Greater than (>)


Indicates that if the value to the left of the operator is greater than the value
to the right of the operator, the expression is true.

OR
Joins a series of expressions within a whole condition or restriction. Only
one of these expressions must be true for the entire expression to be true.

Less than or equal to (<=)


Indicates that if the value to the left of the operator is less than or equal to
the value to the right of the operator, the expression is true.

Less than (<)


Indicates that if the value to the left of the operator is less than the value to
the right of the operator, the expression is true.

60

U S E R S

G U I D E

C H A P T E R

C AL C U LA T ED

F IE LD S

NOT
Reverses the meaning of the expression following it. For example, the
following expressions are written differently but have the same result:
NOT(Account Balance < 5000)
Account Balance >= 5000

Fields tab
The Fields tab contains two drop-down lists: Resources and Field. Once a
resource is selected, the Field drop-down list is enabled, displaying all
available choices of the selected resource type. If there are no values for the
selected resource type, the Field drop-down list will remain disabled.
The Resources drop-down list always begins with four system entries:
Report Fields, Calculated Fields, RW Legends, and Globals. These are
followed by the name of each table associated with the current report. If a
table name is selected, each field in that table will be listed in the Field
drop-down list. The following describes each system entry, and what
appears in the Field drop-down list if that entry is selected.
Refer to Chapter 10,
Modifying Fields, for
information about
using the Report Field
Options window to
change a fields display
type.

Report Fields
Report Fields fills the Field drop-down list with all fields on the report that
have modified display types (fields for which the Report Field Options
window has been used to change the fields display type from Data to some
other type, such as Count). The display type, or an abbreviation of the type,
is listed first, followed by the name of the field to which it was applied. Use
the Report Field Options window to change a fields display type.

Calculated Fields
Calculated Fields fills the Field drop-down list with all calculated fields the
current calculated field can reference. Under special circumstances,
dependencies between calculated fields can that prevent them from being
used by the current calculated field. If a calculated field cant be used, it
wont be displayed in the list.
Refer to Chapter 9,
Legends, for more
information about
using legends in
reports.

RW Legends
RW Legends fills the Field drop-down list with one selection: Legend.
Selecting this value allows you to use one of the legend values passed into
the report by the application. When you click Add, a dialog box will appear,
prompting you to enter an index value indicating which legend value to
use. The legend will be added to the expression youre creating.

USERS

GUIDE

61

PA RT

C R E A TI N G

R E P O R T S

A legend is passed into the calculated field as a string. If you need the legend value
to have some other storage type, you will need to use one of the system-defined
functions to convert the legend value. System-defined functions are described in
System-defined functions on page 64.
Often, legends are used in a calculated field to specify the array index of an
array field. The following procedure describes how to use a legend to
specify the array index in a calculated field.
1. Add an array field to the expression.
Select an array field to add to the expression and click Add. A dialog
box will appear, prompting you to enter the array index. Enter any
number, then click OK.
2. Remove the array index.
Highlight the newly-entered index number in the expression, and then
click Remove.
3. Insert the appropriate conversion function.
Click the Functions tab, and select the STR_LNG system-defined
function. Click Add. This function will convert the legend (a string
value) value into a long integer so it can be used as the array index.
4. Add the legend.
Click the Fields tab. Select RW Legends from the Resources drop-down
list, and Legend from the Field drop-down list. Click Add; you will be
prompted to enter the array index. Enter the number corresponding to
the position of the desired legend value. For example, if four legend
values are passed to the report, enter an index of 1 to specify the first
legend, 2 to specify the second, and so on.
The value you passed to the first legend will specify which array element
value to display. If the value 1 is passed to the first legend, the first quarters
bonus value is displayed. If the value 2 is passed to the legend, the second
quarters value is displayed, and so on.

Globals
Globals populates the Field drop-down list with all of the fields declared as
global variables in the current dictionary.

62

U S E R S

G U I D E

C H A P T E R

C AL C U LA T ED

F IE LD S

Constants tab
Constants are values you set. Typically, they are used in the True Case and
False Case fields, or as a value against which fields are compared in the
expression. This tab contains two fields: the Type drop-down list and the
Constant field.
The Type drop-down list contains five choices: Integer, Currency, String,
Date, and Time. The value you are allowed to enter in the Constant field
depends on the constant type selected. For example, if you select Integer as
the constant type, you will be able to enter only numeric values in the
Constant field.
The following expression shows the use of two different constant types. The
12:00:00 PM value is a constant of the Time type, while the True Case and
False Case fields values of Morning and Afternoon are String type
constants.

Functions tab
Within the Functions tab, you must select the type of function you want to
use, either System-Defined or User-Defined. System-Defined is the default.
Depending on which type of function is selected, one or two drop-down
lists will appear below the radio group. If System-Defined is selected, the
Function drop-down list will appear, allowing you to choose one of the
predefined functions. If User-Defined is selected, two drop-down lists will
appear, Core and Function. To select a function youve created, you must
first select the core with which the function is associated. You can then
select the desired user-defined function from the Function drop-down list.
Many of the system-defined functions convert a fields storage type. For example,
the CUR_STR function converts a currency control type field to a string control
type field. The conversion doesnt affect the way the field is stored in the table, only
how its data is evaluated in the calculated or conditional expression.

USERS

GUIDE

63

PA RT

C R E A TI N G

R E P O R T S

System-defined functions
To use system-defined functions in expressions, select a function from the
drop-down list and click Add. Then, from the Fields tab, select the field you
wish to use with the function and click Add. The field will appear in the
expression, enclosed in parentheses.
You cant apply one system-defined function to another, or nest one
function within another. For example, if youre using the
CUR_STR function to convert a currency field to a string, you cant use the
STRIP function to remove extra spaces from the same field. For example,
the following is not permitted:
STRIP (CUR_STR ( Beginning Balance ) )

If the field you want to create requires using two system-defined functions,
first create a calculated field using the first function, then create another
calculated field that applies a second function to the first calculated field, as
in the following example:
Calculated field 1

CUR_STR ( Beginning Balance )

Calculated field 2

STRIP ( Calculated field 1 )

Each system-defined function takes only one parameter. The following


briefly explains each of these functions:

CUR_STR
Converts a field with a currency storage type to a string.

DAY
Takes a date value and returns the day portion of the date. The integer
value returned will range from 1 to the maximum number of days in the
month.

DAY_NAME
Takes a date value and returns a string containing the name the day of the
week for the date value.

64

U S E R S

G U I D E

C H A P T E R

C AL C U LA T ED

F IE LD S

DOW
Takes a date value and returns an integer representing the day of the week
the specified date falls on. The following table lists the integer values and
the corresponding day:
Integer value

Day

Sunday

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

INT_STR
Converts a field with an integer storage type to a string type.

LFT_STR
Prints only the data that lies to the left of the caret (^) in a field with a string
storage type. If there is more than one caret in the field, the function will
print only the characters to the left of the leftmost caret. The caret must be
part of the field, not part of a format applied to the fields data type. If there
is no caret in the string, the entire string will be printed, provided enough
space is allocated in the layout area.

LNG_STR
Converts a field with an integer or long integer storage type to a string type.

MONTH
Takes a date value and returns the month portion of the date. The integer
value returned will range from 1 to 12.

MONTH_NAME
Takes a date value and returns a string containing the name of the month
for the date value.

POWER_10
Multiplies 10 to the power specified as this functions parameter. For
example, the value of POWER_10(2) is 10 to the power 2, or 100. This
function is useful for dealing with currency fields and decimal placement.

USERS

GUIDE

65

PA RT

C R E A TI N G

R E P O R T S

RGT_STR
Prints only the data that lies to the right of the caret (^) in a field with a
string storage type. If there is more than one caret in the field, the function
will print all the characters to the right of the leftmost caret. The caret must
be part of the field, not part of a format applied to the fields data type. If
there is no caret in the string, no data will be printed.

STR_DAT
Converts a field with a string storage type to a date. The string of characters
you convert to a date must be in MM/DD/YY format. If the year listed is 35
or less, the year will be preceded by 20, so that the year will be 2035, for
example, instead of 1935.

STR_CUR
Converts a field with a string storage type to a currency type. The current
control panel settings for the currency symbol, thousands separator,
decimal symbol, and negative currency format will be used as the basis for
analyzing the string. If the string cannot be properly interpreted based on
the current control panel settings, it will be interpreted using the following
rules:

No currency symbol
The current control panel setting for the decimal separator
No thousands separator
A minus sign as the negative indicator at the beginning of the value

STR_LEN
Counts the number of characters, excluding blanks at the end of the string
of characters, in a field with a string storage type. Blanks within a string are
counted.

STR_LNG
Converts a field with a string storage type to a long integer. This function
can be used to compare a string field to a long integer field. Since Report
Writer cant compare two fields with different storage types, using the
STR_LNG function to convert the string field to a long integer field allows
you to compare it to other long integer fields.

66

U S E R S

G U I D E

C H A P T E R

C AL C U LA T ED

F IE LD S

STR_VCUR
Converts a field with a string storage type to a variable currency type. The
string will be interpreted using the following rules:

No currency symbol
The current control panel setting for the decimal separator
No thousands separator
A minus sign as the negative indicator at the beginning of the value

STRIP
Removes trailing blank spaces from fields with string storage types. The
STRIP function can be used with the CAT operator, but cant be applied to
an expression containing the CAT operator.
For example, the following expression is valid:
STRIP (Cust_Name) # " has this address: " # STRIP (Address)

The following expression is invalid:


STRIP (Customer Name # Address)

SUBSTRING
Searches fields of the string storage type for a match of the specified string
pattern, regardless of whether that match occurs at the beginning of or
within the string field. Searches are case-sensitive.
Three special characters can be used in the search pattern: the asterisk (*),
the question mark (?), and the backslash (\), as indicated in the following
table.
Character

Matching search results

Any character
Any group of characters
No characters

Any single character

That the following special character is to be treated as part of the


search pattern

USERS

GUIDE

67

PA RT

C R E A TI N G

R E P O R T S

The backslash is used in front of special characters that have specific


meaning in Report Writer, such as quotation marks that indicate the
beginning or end of a field. If you want to search for fields containing a
quotation mark, youll need to place a backslash in front of it to indicate
that the quotation mark is simply a character, and not the sign for the end of
the field. Most symbols, such as the pound sign (#) or the at sign (@), are
special characters and should be preceded by backslashes if you want them
to be evaluated literally in an expression.
The difference between this function and the WILDCARD function is that
this function implicitly adds an asterisk to the beginning and end of the
pattern you specify. For example, the SUBSTRING function would find a
match for the pattern P*L in the word APPLE, while the WILDCARD
function wouldnt.
You must use the SUBSTRING and WILDCARD functions with the equality
(=) and inequality (<>) operators in conditional expressions, to ascertain
whether the data in the field matches or doesnt match the pattern.
In an expression, the SUBSTRING and WILDCARD functions should
always precede the name of the field you want to match to the pattern. For
example, the following example would check whether the values for the
Name field contains the string Ann. Each of the following names would be
considered matches: Anne Jones, MaryAnn Magaldi, and Jose Annez.
SUBSTRING ("Ann") = Name

The following example checks the First_Name field for all names
containing the letter t separated from the letter n by one other
character. Names that would match this search include Astin, Barton,
and Antonette.
SUBSTRING ("t?n") = First_Name

UCASE
Prints the alphabetic characters in the specified string field in uppercase.
Numeric characters wont be affected.

68

U S E R S

G U I D E

C H A P T E R

C AL C U LA T ED

F IE LD S

WILDCARD
Searches fields of the string storage type for an exact match of the specified
string pattern. Searches are case-sensitive.
You can use the *, ?, or \ special characters to indicate the type of match
youre searching for. These special characters have the same effect as they
do with the SUBSTRING function.
Unlike the SUBSTRING function, this function does not implicitly add an
asterisk to the beginning and end of the pattern you specify. Therefore, this
function is useful when you want to search for strings that begin with a
certain character or set of characters.
The following example checks the First_Name field for all names beginning
with the letters To. Names that would match this search include Tony,
Tonya, and Tomas.
WILDCARD ("To*") = First_Name

The following example checks the Local_Businesses field for all stores
beginning with the string Tommys. Note that this search uses both the \
and * special characters. Business names that would match this search
include Tommys Pizzeria and Tommys Bait and Tackle Shop.
WILDCARD ("Tommy\'s*") = Local_Businesses

YEAR
Takes a date value and returns the year portion of the date. The integer
value returned will be a four-digit year, such as 2001.

User-defined functions
In addition to the system-defined functions, you can use functions that
have specifically been added to the application for use in calculated fields.
The names of user-defined functions intended for use in calculated fields
begin with the letters RW so they are recognized by the Report Writer.
A document with descriptions of the user-defined functions available for the Report
Writer is found in the Microsoft Dynamics GP SDK in the Procedures and
functions category. You can find the document by searching for Report Writer.
To add a user-defined function to an expression, select the core the function
is part of from the Core drop-down list. Once a core is selected, the Function
drop-down list will become active. You can then select the desired userdefined function from the Function drop-down list. Click Add to add the
function to the expression.

USERS

GUIDE

69

PA RT

C R E A TI N G

R E P O R T S

The Report Writer automatically adds the selected function to the


expression enclosed in parentheses and preceded by the system-defined
function FUNCTION_SCRIPT. This system-defined function is used only to
process user-defined functions. It is added to the expression by the Report
Writer, and cant be added to the expression from the System-Defined
Function drop-down list.
Once the user-defined function is added to the expression, add any needed
parameters using the fields and constants tabs. Table fields, calculated
fields and constants can be used as parameters for a user-defined function
included in a calculated field. Be sure the parameters are placed before the
closing parenthesis.
Be sure to add the appropriate number and type of parameters for the selected
function. The Report Writer will not check the compatibility of the specified
parameters until runtime.
To use a report field value as parameter for a user-defined function, create a
calculated field with that report field as the only element of the calculated
expression. Then, use that calculated field as the parameter for the user-defined
function in another calculated field.
When a user-defined function in a calculated field is evaluated depends on
the parameters that are passed to the function. If no parameters are passed
to the user-defined function, the function will be evaluated one time when
the report is run. If a table field or value based on a table field is passed as a
parameter to the user-defined function, the function will be evaluated each
time a new record is read from that table.
The RW_AccountNumber user-defined function is used to retrieve an
account number based on an account index stored in a table. The following
is the expression for the calculated field that uses this user-defined function
is shown in the following illustration. Notice that the Account Index field
from the Year-To-Date Transaction Open table is passed to the function.
FUNCTION_SCRIPT(RW_AccountNumber GL_YTD_TRX_OPEN.Account Index )

Using this user-defined function allows you to easily use an account


number on a report without having to attach the Account Master table to
the report.

70

U S E R S

G U I D E

Chapter 8:

Additional Headers and Footers


Additional headers and footers are used primarily to create groups on your
report, grouping all records that contain the same value for a particular
field. Information about additional headers and footers is divided into the
following sections:

Overview of headers and footers


The order of headers and footers
Creating additional headers or footers

Overview of headers and footers


If your report includes a field that contains the same value for several
records, and that field is part of a key or a defined sorting order for
instance, the same invoice number for several line items you can use an
additional header to print that field once, then include its related fields
from each record in the body of the report. When all records related to the
current value of the common field have been printed, the next value of the
common field will be printed, followed by its related fields, and so on. If an
additional footer is based on this same common field, the additional footer
will print before the next iteration of the additional header.
For instance, if you want to create a report listing each of your user classes
and the users in each class, you could use an additional header to print the
name of each class, followed by a list of the users in that class. Once all the
records for the first user class are printed, the additional footer will be
printed. Next, the additional header will be printed again, containing the
name of the second user class, and so on.

USERS

GUIDE

71

PA RT

C R E A TI N G

R E P O R T S

The following illustration displays an example report that uses additional


headers and footers.

The additional header


breaks on the User Class
field, so all records that
contain the Data entry
value are printed together.
Additional header

USER CLASSES
User Class:

Administrator

User ID
Margaret
Tracy

Users in this class: 2


User Class:

Data entry

Report body
Additional footer

Users in this class: 4


User Class:

Supervisor

User ID
Bill
Juanita
Julie
Kim

User ID
Rahul
Dan
Steve

Users in this class: 3

The order of headers and footers


If youre creating two or more additional headers, or two or more
additional footers, be sure to create them in the correct order. They will be
evaluated in the order they appear on the report layout. For example, if you
create three additional footers, the first will appear in the report layout
toward the bottom, next to the report footer. The second will appear above
the first, and the third will appear between the second additional footer and
the report body, as shown in the following illustration.

First additional header


The most recently created
additional header or
footer is placed next to
the report body.
First additional footer

72

U S E R S

G U I D E

C H A P T E R

AD DI TI O N AL

H EA D ER S

A N D

FO O T E R S

You can specify where an additional header or footer should appear. In the
Report Section Options window, highlight the additional header or footer
that should appear directly above the one youre adding, then create the
section as usual.
If you arent satisfied with the order of your additional headers or footers, you must
delete the header or footer you want to move, then re-create it in the desired
location.
Be sure to consider the reports sorting order when determining the
placement of your additional headers and footers. Remember that an
additional header or footer prints when the data in the field its based on
changes. For example, if the field that Header 2 is based on changes before
the field that Header 1 is based on, Header 2 will print first. Therefore, if
you always want Header 1 to appear before Header 2, be sure that the field
you base Header 1 upon appears in the sorting order before the field
Header 2 is based on.

Creating additional headers or footers


To create an additional header or additional footer for a report, open the
Report Layout window for the report. Choose Report Section Options from
the Tools menu to open the Report Section Options window.
1. Open the appropriate window.
Click the New button next to the Additional Headers list or the
Additional Footers list, depending upon which you are adding. The
Header Options or Footer Options window will open. If an existing
header or footer is highlighted in the list, the one you add will appear
after the selected one.
2. Name the resource.
Enter the header name or footer name. This name will appear in the
appropriate section in the Report Section Options window.
3. Limit the number of records in the report body.
If you are defining an additional footer and wish to limit the number of
records that appear in the body of the report before the additional
footer is printed, enter that number in the Records Per Report Body
field. If you have multiple additional footers, this field should be
specified only in the first additional footer.

USERS

GUIDE

73

PA RT

C R E A TI N G

R E P O R T S

Typically, this feature is used when the report is to be printed on a


preprinted form. For example, consider a preprinted form with a stub
on top and a check blank on the bottom. If the stub can list up to four
separate invoices that are being paid by the check, you should include
the invoice number and invoice amount fields in the body of the report,
and the date, and payment amount (both in numbers and in words),
appropriately spaced in the additional footer.
4. Select the field the resource will be based upon.
From the Report Table drop-down list, select the name of the table that
contains the field the additional header or additional footer should be
based on. The reports main table will appear in this list by default.
If you havent created a sorting definition for the report, only fields that
are part of the key for the report table youve selected will be displayed
in the Table Field list. If youve created a sorting definition for the
report, only fields from the selected table that are part of that sorting
definition will appear.
If an additional header or footer is based on a field used in a sorting definition,
and that sorting definition is later deleted, the additional header or footer must
be deleted as well.
Refer to Chapter 7,
Calculated Fields, for
more information
about calculated fields.

5. Specify the resources suppression option.


Select the Suppress When Field Is Empty option if you dont want this
additional header or footer to be printed if a specific calculated field is
empty. Once this option is selected, the Calculated Field drop-down list
will be enabled. Select the name of the desired calculated field.
6. Set remaining additional footer options.
If you are defining an additional footer, several other options are
available. Select each option that is appropriate for the current
additional footer:
Page Break Starts a new page after the additional footer is printed.
You can use this option even if you dont display any data in this
additional footer.
Reset Report Begins a new report each time this additional footer
completes printing. The page footer and report footer, if active, will
print after this additional footer, before the new report begins printing.
Once the new report begins, the page numbers will begin again at 1,
and the report header, if active, will be printed.

74

U S E R S

G U I D E

C H A P T E R

AD DI TI O N AL

H EA D ER S

A N D

FO O T E R S

Suppress Last Records Footer Suppresses the last occurrence of


the additional footer. If you mark this option, you may want to mark
Reset Report as well. If you dont, only the last occurrence of the
additional footer on the entire report will be suppressed.
For example, you may want to mark this option if youre creating a
layout for checks with a stub both on the top and bottom. The stubs
would be placed in the body, while the check would be placed in an
additional footer. Since only one check should be printed, the second
additional footer should be suppressed.
No Break At Record Count Mark this option if you have specified
a number in the Records Per Report Body field, but want the additional
footer to print only when the value in the field the footer is based on
changes. If a value is specified in the Records Per Report Body field and
this option isnt marked, the footer will print even if the field the footer
is based on hasnt changed.
This option shouldnt be marked if youre printing checks on
preprinted forms, but you may want to mark it if youre printing
invoices on forms with more than one page.
7. Save the resource.
Click OK to save the additional header or additional footer, and return
to the Report Section Options window.

USERS

GUIDE

75

76

U S E R S

G U I D E

Chapter 9:

Legends
Legends are fields you can add to your report to display information that is
passed to the report when it is printed. Typically, legends are used to
display string values representing the sorting and restriction options
selected by the user running the report. Legend values can also be used as
elements in calculated fields.
Since legend values must be passed into the report by the application, they
are generally available only for modified reports. Any new reports you
create wont be able to use legends, unless you have Visual Basic for
Applications (VBA) and have set up scripts that set the legend values.
Information about legends is divided into the following sections:

Using legends
Legends example

Using legends
To add legends to the Report Layout area, follow these steps:
1. Select Legends from the drop-down list in the Layout tab of
the Toolbox.
The scrolling window below the list will be filled with the word Legend
followed by an array index (such as Legend[1] and Legend[2]).
2. Drag a legend to the layout area.
Add legends to the report layout area sequentially, beginning with
Legend[1]. You can add the same legend to report multiple times if you
want that legends value to appear in multiple locations on the report.
If you dont have specific information about the values passed into legends for a
report, you can find out how the legends are used. Add the legends to the report
layout and print the report. If legend values are passed into the report, they
will be printed on the report.
3. Add additional legends to the layout area.
You can add up to 255 legends the layout area. Add the first 30 legends
by selecting a legend from the scrolling window in the toolbox and
dragging it to the layout area.

USERS

GUIDE

77

PA RT

C R E A TI N G

R E P O R T S

To add additional legends, drag a legend from the toolbox to the layout
area, and double-click it to open the Report Field Options window. Use
this window to change the array index of the legend. To change the
array index, change the value of the Array Index field to appropriate
index number, and click OK.
Be sure to resize each of your legends to accommodate the largest amount of
information that could be included in it. If legends arent sized properly,
information will be truncated.

Legends example
The following illustration shows the Item List report. This report uses
legends to list the ranges of items that are included in the report. It also uses
a legend to indicate how items are sorted. Two other legends are used to
indicate whether discontinued items and vendor information are included
in the report.

78

U S E R S

G U I D E

Chapter 10:

Modifying Fields
Fields in the report layout can be modified in three ways: a format can be
applied to them, their visibility setting can be altered, and their display type
can be changed. Use the Report Field Options window, shown in the
following illustration, to make these modifications.

Information about modifying fields is divided into the following sections:

Field visibility
Specifying a format resource
Specifying a format field
Changing display types
Display type summary

Field visibility
Fields in the report layout area can have their visibility set to one of three
options: visible, invisible, and hide when empty. Fields added to the layout
area are automatically set to visible.
Visible fields are always displayed on the report, even if the field is blank
for a given record. If a visible field is blank but has a format applied to it,
the formatting will be displayed on the report without any data. For
example, a ZIP code field could be formatted to include a dash between the
fifth and sixth characters. If this field is included on a report and is visible,
and a given record has no ZIP code data, only a dash will appear in the ZIP
code field for that record on the report.

USERS

GUIDE

79

PA RT

C R E A TI N G

R E P O R T S

A hide when empty field will not be included on a report for a specific
record if the field is blank. For example, if a customer record doesnt
include a telephone number, and the phone number field is marked as hide
when empty, then for that customer record, the empty phone number field
and any related formatting wont be included on the report.
Selecting hide when empty prevents formatting from appearing on a report when
the field contains no data.
An invisible field will never be shown on the report output. When a field is
invisible, it will appear in the report layout in gray with a dashed border, as
shown in the following illustration:

This field is invisible.

Commonly, fields are marked as invisible when their values are needed for
use in calculated fields, but are not needed for display on the report. For
example, you may want to display a field on the report showing the
difference between the highest and lowest values of specific field. To
accomplish this, add the field to a footer in the report layout twice. Change
the display type of one instance to Minimum, and the display type of the
other to Maximum. Then, create a calculated field that subtracts the
minimum value from the maximum value. Since only the calculated field
needs to be displayed on the report, set the visibility of the minimum value
and maximum value fields to invisible.

Specifying a format resource


Applying a format to a field changes the way in which the data stored in
the field is displayed. For example, the phone number field may contain the
value 7015551234. By applying a format that adds parentheses around
the first three digits and adds a dash between the sixth and seventh
digits, the value will be readily recognizable as the telephone number
(701) 555-1234.
Refer to Chapter 18,
Formats, for more
information about
creating formats.

80

U S E R S

G U I D E

You can apply formats created with the Format Definition window to
string, currency, composite, and numeric fields that appear in the report
layout. To apply a format to a field, click the Format lookup button in the
Report Field Options window to display a list of formats that can be
applied to the field. Select a format in this list, or click New to create a new
format. When you have finished, the name of the format applied will
appear in the Format field in the Report Field Options window.

C H A P T E R

1 0

M O D IFY IN G

F IE LD S

Specifying a format field


This is an advanced
formatting feature. You
may want to skip this
section until you have
a better understanding
of the Report Writer.

The formatting displayed for certain string and currency fields in Microsoft
Dynamics GP is based on the value of an integer field called a format field.
You specify a format field to use by selecting a field in the Format Field list
of the Report Field Options window. The integer value contained in the
selected format field specifies how to format the report field.
Dont apply a specific format to a report field and use the Report Field Options
window to specify a format field for the same report field; the format results will be
unpredictable.

Formatting currency fields


When you select a format field for a currency field, the possible formats for
currency fields and the integer value associated with them are shown in the
following table.
Integer

Format

Integer

Format

Control panel defaults

10

$1,234.567

1,234

11

$1,234.5678

1,234.5

12

$1,234.56789

1,234.56

13

1,234%

1,234.567

14

1,234.5%

1,234.5678

15

1,234.56%

1,234.56789

16

1,234.567%

$1,234.

17

1,234.5678%

$1,234.5

18

1,234.56789%

$1,234.56

The integer value used to indicate the format used can be stored in a table
along with the currency field being formatted. When the record is retrieved
from the table, the currency field will display as it did when the record was
saved. The format field can also be used for a report, allowing the currency
field to appear in the report as it did when it was saved in the table.
Microsoft Dynamics GP can define its own formats, in addition to those shown in
the previous table. This capability is used to define currency format information for
multicurrency support.

USERS

GUIDE

81

PA RT

C R E A TI N G

R E P O R T S

Formatting string fields


For string fields, the integer value indicating the format to use corresponds
to the position of the format string in the Format Definition window.
The following example describes a Part Number field that has three
different format strings. The user selects the format to apply by selecting
the corresponding format in a drop-down list linked to the Part Number
field. The three format strings for the Part Number field, entered in the
Format Definition window, are shown in the following illustration.
This format string is used when
the format field value is 0 or 1.
This format string is used when
the format field value is 2.
This format string is used when
the format field value is 3.

Using format fields


The presence of a format field typically wont affect modifications you
make to reports. You need to watch for fields that have a format field
specified. If you make modifications to these fields, be sure the format field
remains unchanged so the data in the field continues to display properly.
Another situation to be aware of occurs when Microsoft Dynamics GP uses
a format field to apply multicurrency formatting to currency fields for a
report. All of the currency fields in the report will use a format field
typically named Currency Index. The value of this field indicates what
multicurrency formatting will be applied to all of the currency fields linked
to it. If you add currency fields to the report, be sure those fields use the
same format field that Microsoft Dynamics GP is using.

Changing display types


Fields for which the
display type has been
changed are referred to
as report fields.

82

U S E R S

G U I D E

A field in the report layout can have its display type changed to alter the
way in which data is displayed in the field. For example, you can add the
invoice_total field to the body of a report, then add it again to the reports
footer. By changing the display type of the invoice_total field located in the
report footer to Sum, that field will not display a specific invoices total.
Instead, it will display the sum of all instances of the invoice_total field
displayed in the body.

C H A P T E R

1 0

M O D IFY IN G

F IE LD S

To change a fields display type, select the desired type from the Display
Type list in the Report Field Options window. The following describes each
display type, including information about the storage types each type can
or cant be used with:

Average
Prints the average value of the data printed in a group or on a report. This
display type should not be used with fields having string, date, or time
storage types.

Control Count
Prints the number of times the additional footer immediately above the
footer containing the Control Count field is printed on a report. The Control
Count display type can be used only when youre printing information in
groups using additional footers. This display type should not be used with
fields having date or time storage types.

Count
Prints the number of times a field is printed in a group or on a report. This
display type can be used with fields of all storage types. If youre printing a
report with groups and counting categories, use the Control Count display
type instead.

Data
Prints data without modifications, as its stored in the table. All fields in the
body of the report whose display types have not been modified have the
display type Data. Calculated fields placed in footers should have their
display type changed from Last Occurrence to Data, so that the calculations
will perform properly. This display type can be used with fields of all
storage types.
The Report Writer allows you to assign the Data display type to fields other than
calculated fields in a footer; however, calculated fields are the only fields that should
have the Data display type in a footer. The Report Writer sets the default display
type for fields placed in footers to Last Occurrence. The Sum display type is another
display type commonly used in footers.

First Item In Group


Prints the first value that was printed in a group or on a report. This display
type should not be used with fields having date or time storage types.

USERS

GUIDE

83

PA RT

C R E A TI N G

R E P O R T S

First Occurrence Only


Prints a value only the first time it occurs, instead of each time it occurs. You
can use the First Occurrence display type to organize your data in groups
without the use of additional headers and footers. This display type can be
used with fields of all storage types.

Last Occurrence
Prints the last value of the field that was printed in a group or on a report. It
also can be thought of as the current occurrence. All fields placed in footers
are automatically assigned a Last Occurrence display type. Calculated
fields placed in footers should have their display type changed from Last
Occurrence to Data, so that the calculations will perform properly. This
display type should not be used with fields having date, time, or text
storage types.

Maximum
Prints the greatest value of the field that was printed in a group or on a
report. This display type should not be used with fields having string, date,
or time storage types.

Minimum
Prints the smallest value of the field that was printed in a group or on a
report. This display type should not be used with fields having string, date,
or time storage types.

Previous Occurrence
Prints the value of the field printed immediately before the last occurrence
in a group or on a report. This display type should not be used with fields
having date or time storage types.

Running Sum
Prints the total of the fields values at the point where the field is placed
within the entire report. This display type should not be used with fields
having string, date, or time storage types.

Sum
Prints the sum within a group or on a report. This display type should not
be used with fields having string, date or time storage types.

84

U S E R S

G U I D E

C H A P T E R

1 0

M O D IFY IN G

F IE LD S

Display type summary

Average

Control Count
X
X

First Item In Group

Report Footer

Page Footer
X

Count
Data

Additional Footers

Body

Additional Headers

Page Header

Report Header

The following table indicates which display types can be used in the
various sections of a report.

X
X

Last Occurrence

Maximum

Minimum

Previous Occurrence

First Occurrence Only

X*

Running Sum

Sum

* Refer to notes in text

You can use a First Occurrence Only display type in the body of a report if
one of the following conditions in true:

The field is in the selected key for the main table of the report.

If you use an alternate sorting definition for the report, the field must be
one of the segments in the sorting definition.

The value of any report fields you use in the page header or page footer,
such as Average or Sum, will be based on records used for the body of the
report. They wont take into account records used for additional headers or
additional footers.

USERS

GUIDE

85

86

U S E R S

G U I D E

PART 3: GATHERING DATA

Part 3: Gathering Data


This portion of the documentation describes the structure of data for
Microsoft Dynamics GP, and explains how to gather data from various
tables for use in reports. The following is a list of the topics discussed, along
with a brief explanation of each:

88

U S E R S

G U I D E

Chapter 11, Data Storage, explains how data is stored in Microsoft


Dynamics GP.

Chapter 12, Table Relationships, explains how to create and use table
relationships to gather data to use in a report.

Chapter 13, Virtual Tables, describes virtual tables and how to use
them for reports.

Chapter 11:

Data Storage
This portion of the documentation describes how data is stored in Microsoft
Dynamics GP. It also describes how to determine which tables you need to
use to gather the data for your report. Information is divided into the
following sections:

Terminology
Table names
Table types
Table groups

Terminology
The following terms describe the basic parts of a database. You should
become familiar with these terms to better understand how the accounting
system stores data.
Fields A field represents one category of information that can be stored in
a table, such as a customer name or a customer address. For instance, if you
were to track customer names and addresses, you could use the following
fields:
Fields
Customer ID

Customer
Name

Address

City

State

Records A record is made up of one instance of each field in a table. All


of the records in a table contain the same fields (categories of data). For
keeping track of customer names and addresses, think of a record as one
row in a table containing the information. Each row (record) contains the
information for one customer.

USERS

GUIDE

89

PA RT

G A T H E R I N G

D A TA

Customer ID

Record

Customer
Name

Address

City

State

C1002

Jean
Thompson

P.O. Box 8392


82 101 Ave.

Kansas
City

C1392

Serge
Lemieux

11 Ash Lane

Edmonton

AB

C4432

Dan Smith

239 Hampton
Village

Fargo

ND

C4499

Cheryl Miner

9800 Woodland
Drive

Springfield

IL

MO

Tables A table is a collection of records, such as your business customer


records. Tables group related records the same way the table in the
following illustration groups customer records.

Customer ID

Customer
Name

Address

U S E R S

G U I D E

State

C1002

Jean
Thompson

P.O. Box 8392


82 101 Ave.

Kansas
City

C1392

Serge
Lemieux

11 Ash Lane

Edmonton

AB

C4432

Dan Smith

239 Hampton
Village

Fargo

ND

C4499

Cheryl Miner

9800 Woodland
Drive

Springfield

IL

Table

90

City

MO

C H A P T E R

1 1

D A T A

S T O R A G E

Keys A key is a field or combination of fields within a record that is used


as a basis by which to store, retrieve, and sort records. Typically, the value of
the key field is unique for each record so a particular record can be located
quickly.
For instance, to locate a particular customer in the customer name and
address table, you could search the table alphabetically using the customer
name column. In this case, the customer name field is used as the key.
Key
Customer ID

Customer
Name

Address

City

State

The following example shows how a database application could store


information for customer records in a table:
Fields
Key 1

Customer ID

Key 2

Record

Customer
Name

Address

City

State

C1002

Jean
Thompson

P.O. Box 8392


82 101 Ave.

Kansas
City

C1392

Serge
Lemieux

11 Ash Lane

Edmonton

AB

C4432

Dan Smith

239 Hampton
Village

Fargo

ND

C4499

Cheryl Miner

9800 Woodland
Drive

Springfield

IL

MO

Table

USERS

GUIDE

91

PA RT

G A T H E R I N G

D A TA

This table has five fields: Customer ID, Customer Name, Address, City, and
State. It also has four records, each containing one Customer ID, Customer
Name, Address, City, and State field. The table has two keys. The first key is
composed of the Customer ID field. Because no two customers can have the
same Customer ID, this key ensures each customer is uniquely identified.
The second key is composed of the Customer Name field. This key allows a
customer record to be easily located, based upon the customers name.
Table Groups A table group is a group of logically-related tables. For
example, a customer master table, a customer address table, and a customer
history table all compose a table group. Every table in Microsoft Dynamics
GP is part of a table group.

Table names
You can use the Table
Descriptions window
to find the names of
tables.

Each table has three names: a display name, a technical name, and a physical
name.
Display name The display name is the name you see in a window, such
as Rebuild or Pathnames.
Technical name The technical name is used internally to refer to the
table.
Physical name The physical name is the name under which the table is
stored by the operating system or database.
The following table lists three names for one of the tables that stores
account category information.

92

U S E R S

G U I D E

Display name:

Account Category Master

Technical name:

GL_Account_Category_MSTR

Physical name:

GL00102

C H A P T E R

1 1

D A T A

S T O R A G E

Table types
To work with the Microsoft Dynamics GP database, you need to know some
specific information about tables in the database. Most of the information
youll need to access when creating reports will be stored in one of the
following types of tables. Knowing which type of table contains the
information you want will help you find the data you need.
Setup tables contain all the default settings and module options youve
specified in the setup windows for each series.
Master tables contain all the permanent data about your business. These
may include information about accounts, vendors, customers, items, and so
on.
Work tables contain unposted batches of transactions entered using
transaction windows in the system. These transactions are temporary and
can be changed or deleted until they are posted to an open table.
Open tables contain posted transactions for the current year, of which
some may be unpaid. Information in open tables is moved to history tables
when the transactions are paid.
History tables contain paid transactions, or transactions from a previous
year.

Table groups
To create a report, you need to decide which tables data will come from. If
all the data for your report is stored in a single table, you can select the table
as the main table for the report and begin creating your report.
If a single table doesnt contain all the data you need for your report, you
must choose one table as the primary table, and then link additional tables
to it. You can select either the table that contains the majority of the fields
for your report or the table that contains the most general information as
your main table. Once youve selected a main table, link other tables to that
table as needed.

USERS

GUIDE

93

PA RT

G A T H E R I N G

D A TA

A table group is a group of logically-related tables. For example, a customer


master table, a customer address table, and a customer history table all
compose a table group. Every table in Microsoft Dynamics GP is part of a
table group. Often, the data for a report will come from the tables in a table
group.
The table types described in Table types on page 93 setup, master, work,
open and history are actually table groups. These table groups are actually
composed of information stored in several separate tables. For example, the
General Ledger Transaction Work Table is a table group, made up of the
following tables:

Transaction Work (GL_TRX_HDR_WORK)


Transaction Amounts Work (GL_TRX_LINE_WORK)
Transaction Clearing Amounts Work (GL_TRX_Clearing_WORK)
Audit Trail Code Temporary (GL_Audit_Trail_WORK)

Technical table names are shown above in parentheses. General information


about each transaction, such as the audit trail code and date, are stored in
the Transaction Work (GL_TRX_HDR_WORK) table, and transaction
amounts
are
stored
in
the
Transaction
Amounts
Work
(GL_TRX_LINE_WORK) or Transaction Clearing Amounts Work
(GL_TRX_Clearing_WORK) table, depending upon whether youve
entered a standard transaction or a clearing transaction.

Transaction
Work
table

Transaction
Amounts
Work
table

Transaction
Clearing
Amounts
Work
table

Audit
Trail
Code
Temporary
table

Transaction Work table group

In some cases, a table group will contain only one table. For many system
tables, the table group is made up of a single table with the same name as
the table group.
You can use the Software Development Kit (SDK) to find additional information
about tables in Microsoft Dynamics GP.

94

U S E R S

G U I D E

Chapter 12:

Table Relationships
Table relationships allow the Report Writer to gather data from related
tables and use the data in a single report. Information about table
relationships is divided into the following sections:

Table relationship overview


Types of table relationships
Defining a table relationship

Table relationship overview


You can define a relationship between two tables if any of the fields in one
of the secondary tables keys are also present in the primary table. The
fields the relationship can be based on dont need to be part of a key in the
primary table, nor do they have to use the same global field. However, they
must be based on compatible data types.
For example, a relationship could be defined between the Sales table and
the Customer List table, based upon the Buyer Name field in the Sales table
and the Customer Name field in the Customer List table.
If a report youre creating needs information from multiple tables, table
relationships must exist that indicate how the data in each table relates to
data in the other tables. The most-common table relationships have already
been set up in Microsoft Dynamics GP. If a table relationship hasnt been
defined for the table you need to access, you will need to create one using
the information provided here.

Types of table relationships


Table relationships can be categorized as one-to-one or one-to-many
relationships. A one-to-one relationship means that for every record in the
primary table, there is at most one and only one corresponding record in the
secondary table. A one-to-many relationship means that for every record in
the primary table, there can be any number of records in the secondary
table.

USERS

GUIDE

95

PA RT

G A T H E R I N G

D A TA

The following illustration shows the differences between one-to-one and


one-to-many relationships.
Customer_Info

Customer_Master
one-to-one
relationship

Cust_ID

Name

Cust_ID

City

State

0001

Greg Wilson

0001

Valhalla

NY

0002

Pam Anderson

0002

Indianapolis

IN

0003

Jose Martin

0003

Phoenix

AZ

Customer_Master
one-to-many
relationship

Invoice_Data

Cust_ID

Name

Invoice_ID

Cust_ID

Invoice_Total

0001

Greg Wilson

31-1964

0001

223.75

0002

Pam Anderson

65-1296

0003

658.20

0003

Jose Martin

77-4538

0001

439.50

The Customer_Master table is the primary table in both examples. In the


one-to-one relationship, there can be only one record in both the
Customer_Master and Customer_Info tables with the Cust_ID 0001. In the
one-to-many relationship, there can be only one record in the
Customer_Master table with the Cust_ID 0001, but there can be multiple
invoices associated with that Cust_ID in the Invoice_Data table.
You do not need to specify the type of relationship when you use the Table
Relationship Definition window to define a relationship between two
tables. The Report Writer automatically chooses the appropriate type of
relationship based upon the fields you use to link the tables. It is still
important to understand relationship types because the type of relationship
between tables will affect the type and quantity of data that you can use in
your report.

Defining a table relationship


To access the Table Definition window, choose Tables from the Tables
button on the toolbar. The Tables window will open. Select the name of the
table you wish to use as the primary table, and then click Open. The Table
Definition window for the desired table will open.
Use the following procedure to access the Table Relationship Definition
window and define a new relationship. As an example, a table relationship
will be created between the Sales Transaction Work (SOP_HDR_WORK)
table and the Record Notes Master table. This table relationship allows the
record-level note for an invoice to be printed on the invoice.

96

U S E R S

G U I D E

C H A P T E R

1 2

T A B L E

R E L A T I O N S H I P S

1. Open the Table Relationship window.


From the table definition of the table you wish to use as the primary
table, click the Relationships button.

2. Create a new table relationship.


Click New to define a new relationship. The Table Relationship
Definition window will open, and the name of the current table will
appear in the Primary Table field.

Click this lookup button


to select the secondary
table.
The primary table name
automatically appears.

3. Select a secondary table.


Click the Secondary Table lookup button to open the Relationship Table
Lookup window. Select the name of the table you want to use as the
secondary table. In this example, this is the Record Notes Master table.
Click OK. That tables name will appear at the top of the Secondary
Table portion of the Relationship scrolling window.

USERS

GUIDE

97

PA RT

G A T H E R I N G

D A TA

4. Select a secondary table key.


Choose a key containing the field or fields that you want this table
relationship to be based on from the Secondary Table Key drop-down
list. Once the key is selected, each of its key segments is listed in the
Secondary Table portion of the Relationship scrolling window.
If you are defining a one-to-many relationship, selecting a key that places
records from the secondary table in the desired order will optimize
performance.
5. Select related fields.
For at least the first of the secondary tables key segments, select a
related field from the corresponding drop-down list in the Primary
Table portion of the Relationships scrolling window. The drop-down
list contains only fields from the primary table that have a data type
compatible with the corresponding key segment in the secondary table.
For example, if the key segment is a STR30 data type, only fields in the
primary table that are compatible with the STR30 data type will appear
in the drop-down list.

All fields that have a data


type compatible with the
Note Index field are
included in this list.
The Clear button removes
all selections from the
primary table section.

If the key contains multiple segments, you dont need to select a


corresponding primary table field for each key segment. However, the
key segments for which you do select corresponding fields must be
consecutive key segments. For example, if a key has four segments, you
could select corresponding fields for the first two segments, but not for
the first and third segments only.

98

U S E R S

G U I D E

C H A P T E R

1 2

T A B L E

R E L A T I O N S H I P S

If the secondary tables key upon which this relationship is based


allows duplicates, the relationship will be one-to-many, and Multiple
Records will appear in the Relationship Type field.
If the selected secondary tables key doesnt allow duplicates, and you
select a corresponding field for each key segment, the relationship type
will be one-to-one, and One Record will appear in the Relationship
Type field. If you select a corresponding field for only some of the key
segments, the relationship type will be one-to-many, and Multiple
Records will appear in the Relationship Type field.
To change the primary table field youve selected, simply choose a
different field from the drop-down list. To deselect fields youve
selected and not replace them with different selections, click Clear.
Clicking Clear removes all primary table field selections.
6. Save the relationship.
When youve finished defining the relationship, click OK; you will be
returned to the Table Relationship window. You can define another
new relationship or edit an existing relationship. To edit an existing
relationship, select the name of the secondary table from the Table
Relationships list and click Open.

USERS

GUIDE

99

100

U S E R S

G U I D E

Chapter 13:

Virtual Tables
Virtual tables are special types of tables that allow data stored in separate
tables to be read as if it had been stored in a single table. Information about
virtual tables is divided into the following sections:

Virtual table overview


Viewing virtual table information
Using virtual tables with reports

Virtual table overview


Most reports require data to be retrieved from multiple tables. Typically,
this involves setting up table relationships between the tables and then
creating the appropriate table links for the report. For complex reports, this
can be a difficult task.
A virtual table is composed of member tables, member fields, and member
keys. A virtual table simplifies gathering data from the member tables,
because it contains the information about how the tables are linked
together. The fields in the virtual table are selected from the member tables,
and typically are a subset of all the fields available in those tables. The keys
for the virtual table are selected from the primary tables keys.
You cant create virtual tables with the Report Writer. They must be created by the
application developer.

Viewing virtual table information


You can use the Report Writer to view information about virtual tables in
the current dictionary. Use the following procedure to do so.
1. Open the virtual table definition.
On the Report Writer toolbar, choose Virtual Tables from the Tables
menu. The Virtual Tables window will open. Select a virtual table and
click open.
2. View the list of member tables.
Select the Tables tab in the Virtual Table Definition window to view the
list of standard tables from which the virtual table is accessing data.
You may find it useful to examine virtual tables to find out where
various types of information are stored in the database.

USERS

GUIDE

101

PA RT

G A T H E R I N G

D A TA

3. View the virtual table fields.


Select the Tables tab to display a list of the fields that are included in the
virtual table. These are typically a subset of the fields in the member
tables, and are the only fields you can use from the virtual table.
4. View the virtual table keys.
Select the Keys tab to display the keys available for accessing
information from the virtual table. Only keys from the primary table
can be used. Often, only a subset of keys is made available for the
virtual table.
5. View the member table relationships (optional).
Select the Relationships tab to view information about how the member
tables are related to each other. You may find this information useful if
you need to create table relationships for other tables in the application.

Using virtual tables with reports


Creating a report can be much simpler when the main table for the report is
a virtual table. Because all of the data from the member tables is managed
by the virtual table, you dont need to create the relationships in the Report
Writer.
When you specify the primary table for a report, any virtual tables that exist
for the application will be included in the list of available tables. They are
indistinguishable from standard tables, so you can use them the same way
you would use standard tables. If necessary, you can create a table
relationship that links an existing standard table to a virtual table defined in
the dictionary.

102

U S E R S

G U I D E

PART 4: MODIFYING REPORTS

Part 4: Modifying Reports


This portion of the documentation contains information about how to make
modifications to existing reports in the accounting system. The following
topics are discussed:

104

U S E R S

G U I D E

Chapter 14, Selecting a Report to Modify, explains how to select and


create a modified report.

Chapter 15, Viewing a Modified Report, describes how to view a


report after you have made modifications to it.

Chapter 16, Common Modifications, describes modifications that are


commonly made to reports. It also describes the Reports Library, where
you can download reports that have already had common modifications applied.

Chapter 14:

Selecting a Report to Modify


Much of the work you do with the Report Writer will be modifying existing
reports in the accounting system to better meet the needs of your business.
Before you can make modifications, you must first locate the report you
want to modify. Information about selecting reports to modify is divided
into the following sections:

Finding a report name


Creating a modified report
Modifying the current report

Finding a report name


To modify a report, you need to know its name. When you print a report to
the screen, the name of the report appears in the Screen Output window, as
shown in the following illustration.
Note the window title.

In this example, the report name is SOP Blank Back Order Form.
The sample reports included with Microsoft Dynamics GP are another excellent
source to learn about the reports included with the accounting system.

USERS

GUIDE

105

PA RT

M O D I F Y I N G

R EP O R T S

Creating a modified report


Once you know the name of the report you want to modify, start the Report
Writer. Perform the following steps to create a modified version of the
report.
1. Open the Report Writer window.
Click the Reports button on the toolbar to open the Report Writer
window.
2. Locate the name of the report to modify.
In the Original Reports list, locate the name of the report you want to
modify. Select the name in the list.
3. Create the modified report.
Click Insert. The report will be added to the list of modified reports.
You can then begin making modifications.
A copy of the report you selected to modify was added to the Reports
dictionary, allowing you to make modifications to it. In Part 8, Storing and
Accessing Reports, you will learn more about how modified reports are
stored and accessed.

Modifying the current report


If you are viewing the Screen Output window for the report you want to
modify, you can point to Customize in the Tools menu and choose Modify
Current Report. The Report Writer will start, the report will be added to the
list of modified reports, and the layout for the report will be displayed.

Choose Modify Current


Report to create a
modified version of the
report being displayed.

106

U S E R S

G U I D E

C H A P T E R

1 4

S E L EC TI N G

R E P O R T

T O

M O D I F Y

You can also click the Modify button to open the current report in the
Report Writer.

Click the Modify button


to open the report in the
Report Writer.

USERS

GUIDE

107

108

U S E R S

G U I D E

Chapter 15:

Viewing a Modified Report


Once you have made modifications to a report, you will want to print the
report to verify its appearance. How the data for the report is generated
determines how you can display the report. Most reports read data directly
from tables in the database for the accounting system. However, some
reports retrieve their data from special temporary tables that are created
by the accounting system. Reports that read data directly from tables in the
database can be viewed and printed from within the Report Writer. Reports
that use temporary tables cannot, because the Report Writer has no way to
add data to temporary tables.
Information is divided into the following sections:

Viewing from the Report Writer


Viewing from the application

Viewing from the Report Writer


If the report you modified doesnt use any temporary tables, you can view
it from within the Report Writer. Use the following procedure to view the
report.
1. Select the report.
In the Report Writer window, select the modified report in the Modified
Reports list.

Select a modified report, and then click


Print. If the Print button is disabled, the
report cannot be printed from within
the Report Writer.

USERS

GUIDE

109

PA RT

M O D I F Y I N G

R EP O R T S

2. Print the report.


Click Print in the Report Writer window to print the selected report.
You will be asked whether to print the report to the screen or to a
printer. Make a selection and click OK.
If you have selected the modified report, but the Print button is disabled,
the report uses temporary tables. This means you cant print the report from
within the Report Writer, and must return to the accounting system to print
the report. This is described in Viewing from the application.
Reports printed from within the Report Writer may not have exactly the
same appearance they would printed from the accounting system. Some of
the differences when reports are printed from the Report Writer include:

No legend values will be included on the report, because these must be


passed in by the application.

No additional restrictions will be applied to the report.

Records included on the report may be sorted in a different order.

Viewing from the application


If you want to view a modified report from within the application, you
must use the Alternate/Modified Forms and Reports window in Microsoft
Dynamics GP to grant access. To open this window, choose Microsoft
Dynamics GP menu >> Tools >> Setup >> System >> Alternate/Modified
Forms and Reports.

Mark the item to use


the modified version
of the report.

110

U S E R S

G U I D E

C H A PT E R

1 5

VI EW ING

MODI FI ED

R EP O RT

Complete the following procedure to specify that a modified report should


be used.
1. Specify the ID.
Select the ID for the set of forms and report you are modifying. The
users that you want to view the modified version of the report must be
assigned to use the set of modified/alternate forms and reports you
selected. The User Security Setup window is used to specify the set of
modified/alternate forms and reports for each user.
2. Select the product containing the modified the report.
This is the product in which the report was originally defined.
3. Choose to display reports.
Choose Reports as the type of resource to display. The tree view will be
filled with the modified reports available.
4. Locate the modified report.
Expand the nodes in the tree view to locate the report that you
modified. The reports are organized by series.
5. Choose to use the modified report.
The original and modified versions of the report will be listed. Mark the
modified version.
If you later wanted to use the original version of the report, you would mark
the original report instead.
6. Save the changes.
Click Save to save the changes.
After you have set access to the modified report, print it as you typically
would. Be sure the user printing the report is assigned to the appropriate
set of modified/alternate forms and reports. For more information about
printing reports, refer to Part 6, Printing and Mailing Reports.

USERS

GUIDE

111

112

U S E R S

G U I D E

Chapter 16:

Common Modifications
Modifying existing reports is the most common task performed with the
Report Writer. This portion of the documentation describes some of the
common modifications, provides information about how to perform them,
and describes where you can access reports that have already been
modified. Information is divided into the following sections:

Modifying the layout


Changing the page orientation
Adding or removing fields
Using VBA with reports
Reports Library

Modifying the layout


Modifying a reports layout is the most common modification made with
the Report Writer. Report layouts are often changed to match a company
standard, or to have information print properly on preprinted forms.
You can make most layout modifications using the tools in the Toolbox and
the display options in the Drawing Options window. Both are described in
Chapter 4, Report Layout.
Some reports that are included with Microsoft Dynamics GP are text
reports, so fewer tools and drawing options will be available. You can
change a report to be a graphics report, and all of the tools and drawing
options will be available to modify the layout.
Graphics reports can take longer to print than text reports, so if a report is used to
print large quantities of information, you may want to continue using a text report.

USERS

GUIDE

113

PA RT

M O D I F Y I N G

R EP O R T S

Changing the page orientation


Many reports in Microsoft Dynamics GP are designed to be printed in the
landscape orientation. However, most users choose to have their printer set
to print pages in the portrait orientation. You can modify a report definition
to always use a specific page orientation, regardless of the setting on the
workstation from which the report is being printed.

You can specify the page


orientation for a report in
the Report Definition
window

Adding or removing fields


The reports provided with Microsoft Dynamics GP contain the fields that
are required for a typical user. However, some reports may contain fields
that arent required by a specific user. Still other reports may not include
information that would be beneficial for your organization.

Adding fields
If the tables that contain the necessary fields are already part of the report,
adding fields to the report layout is as simple as dragging them from the
Toolbox to the Layout window. Just select the appropriate table in the
Toolbox and drag the fields to the appropriate section of the report layout.
If the necessary tables arent linked to the tables already used for report,
you will need to link them. Linking tables is described in Creating a new
report definition on page 19. If the appropriate table relationships arent set
up between the tables you need to link to your report, you will need to
create the relationships. This is described in Chapter 12, Table
Relationships.
The Knowledge Base at https://mbs.microsoft.com/CustomerSource contains
several entries that describe how to add specific fields to common reports.

114

U S E R S

G U I D E

C H A PT E R

1 6

C O M M O N

M O D I F I C A TI O N S

Removing fields
If a report contains fields you dont need, you may want to remove them
from the report layout. To ensure that the report continues to work
properly, we recommend that you dont remove fields from the report.
Rather, we suggest that you set the Field Options for the report to make the
field invisible.

Rather than remove a


report field, set the option
to make the field invisible.

Using VBA with reports


If you have installed the Modifier with VBA (Visual Basic for Applications),
you can add VBA code to reports to further customize them. Common
customizations include:

Performing special calculations on report data

Applying additional restrictions for the report

Exporting data from the accounting system to external data sources

Refer to the VBA Developers Guide for complete information about using
VBA with the Report Writer.

USERS

GUIDE

115

PA RT

M O D I F Y I N G

R EP O R T S

Reports Library
The Reports Library is a special area of the Microsoft Dynamics web site
that contains reports which have already had common modifications made
to them. Most of the reports available are graphic reports. You can access
the Reports Library at the following address:
https://mbs.microsoft.com/customersource/support/downloads/
reportslibrary/
Browse the Reports library and download the reports you want. Most of the
reports in the Reports Library are modified versions of existing reports. To
install a report from a package file, follow the procedure described in
Importing a package file on page 185. After you have used the Customization
Maintenance window to install the reports, use the Alternate/Modified
Forms and Reports window to provide access to them. Setting security for
modified reports is described in Chapter 31, Accessing Reports.

116

U S E R S

G U I D E

PART 5: GLOBAL MODIFICATIONS

Part 5: Global Modifications


The Report Writer also allows you to make changes that will affect all of the
reports in an application. This portion of the documentation provides
detailed information about the various global resources you can modify in
Microsoft Dynamics GP. The following topics are discussed:

118

U S E R S

G U I D E

Chapter 17, Data Types, describes data types and how they control
characteristics of fields.

Chapter 18, Formats, describes how formats are used to control how
data appears when printed on reports.

Chapter 19, Global Fields, explains how to examine global fields in


the accounting system.

Chapter 20, Pictures, describes how to use pictures on reports.

Chapter 21, Strings, explains how to modify string resources in


Microsoft Dynamics GP.

Chapter 22, Tables, describes how to view information about tables in


the application.

Chapter 17:

Data Types
Data type resources specify the characteristics of all fields used in an
application. If you want to change the characteristics of a field, you need to
change its corresponding data type. Keep in mind that a single data type
can be used by multiple fields. When you change the data type, you change
the characteristics of all the fields that use it. Information about data types
is divided into the following sections:

Opening a data type


Keyable length
Static values
Format

Opening a data type


To open a list of data types, click the Data Types button on the toolbar or
choose Data Types from the Resources menu. In the Data Types window,
select a data type and click Open. The Data Type Definition window will
appear, as shown in the following illustration.

The control type is the


main characteristic of the
data type.

The data types name appears at the top of the window. The Control Type
field specifies the function of the data type, indicating how it will display
and store data. The other fields in the window specify the additional
characteristics of the data type. The following sections describe the data
type characteristics you can change with the Report Writer.

USERS

GUIDE

119

PA RT

G L O B A L

M O D I F I C A TI O N S

Keyable length
The keyable length is the number of characters that can be displayed in a
field that uses this data type. Control types such as currency, integer, and
string have a keyable length. You can use the Report Writer to change the
keyable length. For example, you may want to increase the keyable length
for the STR10_Phone data type to allow the user to enter more digits. The
following table lists control types for which you can set the keyable length.
Control type

Maximum keyable length

Combo box

Storage Size - 1

Currency

19

Integer

Long integer

10

String

Storage Size - 1

Text

32,000

Static values
Certain control types allow you to specify static values for the data type.
Static values are any text or pictures associated with a data type that are
displayed by a field using that data type. For example, the text on a push
button and the items in a list box are static values. To view the static values
for a data type, click the Static Values lookup button.

Click this lookup button to


view the static items for
the data type.

The following table lists the control types that use static text values which
can appear on reports.
Control type

120

U S E R S

G U I D E

Static text used to:

Drop-down list

Indicate the selections in the drop-down list.

List box

Indicate the selections in the list box.

Visual switch

Display two or more text values that will be displayed in


sequence as the user clicks the visual switch.

C H A P T E R

1 7

DA TA

T Y P E S

The Static Text Values window is used to specify the static text for dropdown lists, list boxes, and visual switches.

To edit a static text value, select it in the Static Text Values list. Make the
appropriate changes in the New Value field, then click Replace.

Format
A format contains extra characters, spacing, and attributes that can be
applied to a data type when data is printed on a report. Refer to Chapter 18,
Formats, for more information.

USERS

GUIDE

121

122

U S E R S

G U I D E

Chapter 18:

Formats
Formats are the extra characters, spacing and attributes that can be applied
to a data type to format data when it is displayed or printed on a report. For
example, a string data type for a phone number can have a format applied
to it so a field using the data type will print a phone number as (555) 1234567 instead of 5551234567.
Formats are stored as separate resources, but are applied to data types to
help define how information is displayed. A single format resource can be
used by several data types. Perhaps the easiest way to understand what
formats are is to view them as data masks that simply change the look of
the information in a field without changing the actual information itself.
Information about formats is divided into the following sections:

Opening a format
Formatting options
Format string

Opening a format
To open a list of formats, choose Formats from the Resources menu. The
Formats window will appear. To create a new format, click New. To open an
existing format, select one in the list and click Open. The Format Definition
window will appear, as shown in the following illustration.
The format name is
entered here.

Options for the format are


chosen here.
Format strings are
entered here.

Each format has a name. Typically, the name indicates the data type the
format is applied to. For instance, the name STR_Employer_ID_Number
indicates a format that will be applied to a data type used for an Employer
ID number.

USERS

GUIDE

123

PA RT

G L O B A L

M O D I F I C A TI O N S

Formatting options
You can use several formatting options to change how specific types of data
will appear. You can use them to specify the following characteristics:

Align information to the left, right, or center of a field.


Determine what characters will appear in unused parts of a field.
Specify how you want currency fields to appear.
Specify how numeric fields display information.

The following tables describe the various formatting options:


Numeric formats
Decimal Digits

Number of decimal places (0 to 5).

Negative Symbol

The operating system setting, a minus sign, the letters CR, or


parentheses.

Alignment

Number is left-, center-, or right-aligned.

Fill

Unused spaces are filled with asterisks, zeros, or spaces.

Unsigned

If marked, the negative symbol wont be displayed.

Show Thousands
Separator

If marked, the field will show thousands separators in the


number.

Show Percent Sign

If marked, the field will show the percent sign.

Currency formats

124

U S E R S

G U I D E

Decimal Digits

Number of decimal places (0 to 5).

Negative Symbol

The operating system setting, a minus sign, the letters CR, or


parentheses.

Alignment

Number is left-, center-, or right-aligned.

Fill

Unused spaces are filled with asterisks, zeros, or spaces.

Unsigned

If marked, the negative symbol wont be displayed.

Show Thousands
Separator

If marked, the field will show thousands separators in the


number.

Relative Decimal
Position

If marked, the number of decimal digits selected is added to the


number in the operating system setting. The total can be up to 5
decimal digits.

Show Currency
Symbol

If marked, the currency symbol specified in the operating


system settings is displayed.

C H A P T E R

1 8

FORM AT S

String and composite formats


Alignment

String is left-, center-, or right-aligned.

Fill

Unused characters are filled with asterisks, zeros or spaces.

Trailing Blanks

If marked, any spaces that follow the contents of the field will
be saved in the table. If the option isnt marked, any spaces
following the item in the field wont be saved. Leave unmarked
to ensure that the same entry made with or without trailing
blanks will be stored with the same value.

Leading Blanks

If marked, spaces can be entered as the first characters in the


field. These spaces will be saved in a table.

Numeric Only

If marked, only numbers can be entered in the field.

Alphanumeric Only

If marked, only letters and numbers can be entered in the field.

Uppercase Only

If marked, all alphabetic characters will be displayed in


uppercase.

Format string
The Format Definition window allows you to specify a format string for
string and composite data types.

String formats
Format strings are used with string data types to add static elements to a
field, such as parentheses or static text. The Report Writer uses the capital X
as a placeholder to represent alphanumeric characters that will appear in
the field. All other characters will be displayed as you type them.

Example 1
For instance, suppose youre using a specific data type to store information
entered in phone number fields. This Phone_Number data type uses a
format and a format string to determine how phone numbers will appear
on a report:
Format string

Data entered

Data displayed

(XXX) XXX-XXXX

7015550100

(701) 555-0100

ext. XXXX

6590

ext. 6590

USERS

GUIDE

125

PA RT

G L O B A L

M O D I F I C A TI O N S

The Xs are placeholders indicating where the digits will be displayed, while
the parentheses and dash are displayed just as you typed them. Also note
that a lowercase x is used in the ext. abbreviation in the second format
string. Only uppercase Xs are treated as placeholders, so the lowercase x is
displayed in the field, instead of being replaced when data is entered.
Static characters in a format string arent actually stored with the data in the table.
This allows you to change the format string without affecting how data is stored.

Composite formats
A format string is used with a composite data type to indicate the size and
order of the components of the composite, and to add static elements, such
as parentheses or static text. The numeric characters 1 through 9 are used to
represent the characters of each component of the composite. All other
characters will be displayed just as you type them.
Not all composites use a format string. Some composite fields, such as the Microsoft
Dynamics GP Account Number, have their format defined through program code.

Example 2
The following example shows the use of a format for a standard composite.
A composite must have a format and a format string. This composite
contains three parts, as indicated by the format string.
Format string

Data entered

Data displayed

1111-22-3333

1000ND5050

1000-ND-5050

Note that the 1s, 2s, and 3s are used as placeholders.

126

U S E R S

G U I D E

Chapter 19:

Global Fields
Fields represent the individual pieces of information in an application.
They can appear in windows, be stored in tables, and appear on reports.
Each field uses a data type to specify its characteristics. Information about
global fields is divided into the following sections:

Opening a global field


Opening a fields data type

Opening a global field


To open a list of global fields, click the Fields button on the toolbar or
choose Fields from the Resources menu. In the Fields window, select a
global field and click Open. The Field Definition window will appear, as
shown in the following illustration.

You can also open the Global Field Definition window from the Layout
window. Choose the name of a table in the Toolbox to display the fields
from that table. Select a field name in the list and click Open.

USERS

GUIDE

127

PA RT

G L O B A L

M O D I F I C A TI O N S

Opening a fields data type


When the Field Definition window is open, you can easily drill down to the
data type definition used for that field. To open the Data Type Definition
window, click Open.

Click Open to open the


data type for the global
field.

128

U S E R S

G U I D E

Chapter 20:

Pictures
Pictures are typically used to display large graphics and logos in reports.
The Report Writer can convert Windows metafiles to a form that can be
stored in the picture library. Pictures up to 32K in size can be stored. Pictures
are stored only once, but can be placed in several reports by using the
picture tool from the Toolbox in the Layout window.
Information about pictures is divided into the following sections:

Adding a picture to the picture library


Using a picture from the picture library
Guidelines for using logos

Adding a picture to the picture library


Choose Pictures from the Resources menu; the Pictures window will
appear.
1. Create a new picture or edit an existing one.
Click new to create a new picture or select a picture and click Open to
edit it. The Picture Definition window will appear, as shown in the
following illustration.

Enter the name of the


picture here.
To add a picture, click in
this area to select it, and
then choose Paste from
the Edit menu.

USERS

GUIDE

129

PA RT

G L O B A L

M O D I F I C A TI O N S

2. Name the picture.


In the Picture Definition window, name the picture.
3. Add the picture.
Be sure the picture you want to add is in the Clipboard. Click in the area
below the Picture Name field to select it, and then choose Paste from
the Edit menu to paste the picture into that area.
4. Click OK to add the picture to the library.

Using a picture from the picture library


Open the layout of the report where you want to paste a picture.
1. Select the picture tool.
2. Click in the layout area where you want the picture to
appear.
After you click in the layout area, the Pictures window will appear,
allowing you to select a picture to paste into the layout.
3. Select the picture to paste.
From the Pictures window, select the name of the picture to paste into
the window and click OK.
4. Position and resize the picture if necessary.
Drag the picture to the appropriate location and use the resize handles
to make it the appropriate size.
You can paste a picture directly into the report layout, bypassing the step of
adding the picture to the picture library. Simply copy the picture to the
Clipboard and choose Paste from the Edit menu to paste it into a report
layout. Youll be asked to name the picture. The picture will appear in the
layout and will be added to the picture library automatically.

130

U S E R S

G U I D E

C H A P T E R

2 0

P IC T U R E S

Guidelines for using logos


A company logo is a common picture used on reports. Use the following
guidelines to ensure a logo has the best appearance on a report.

In the Report Writer, the graphic will become a bitmap. To find out how
the graphic will appear when printed, try printing it from a paint
application such as Windows Paint.

If you will be using a non-PostScript printer, use a black and white


image. On these printers, an non-white pixels will be printed as black.

Make the graphic as large as possible, staying within the 32k limit. This
allows the graphic to contain maximum detail. When you add the
graphic to a report, it will be very large. Scale the graphic down to the
desired size.
For example, the following illustration shows the Microsoft logo that
was added to a report in the Report Writer. The logo is black and white,
and is 1580 pixels wide and 267 pixels tall. After adding the logo, it
appeared at full size.

Once the logo was added to the report, the resize handles on the
graphic were used to reduce the size of the illustration to 2 inches wide,
or 144 pixels. This is shown in the following illustration.

USERS

GUIDE

131

PA RT

G L O B A L

M O D I F I C A TI O N S

You can use the horizontal and vertical size indication in the Toolbox to
maintain the aspect ratio of the logo when you reduce its size. For
example, when the Microsoft Business Solutions logo was reduced
from 1580 to 144 pixels wide, the corresponding height was reduced
from 267 to 25 pixels.

132

U S E R S

G U I D E

Chapter 21:

Strings
A string is a sequence of up to 79 characters that doesnt contain carriage
returns. Strings are used throughout the accounting system for window
names, field prompts, static text values, and text that appears in reports.
Information about strings is divided into the following sections:

Using strings
Modifying a string

Using strings
The strings resource allows you to update all occurrences of a string in one
step instead of changing the same string in each place it occurs.
For example, to change all occurrences of the words Customer Name to
Client Name, you could select the Customer Name string and change it to
Client Name instead of changing each individual text value.
Note that changing a string with the Report Writer will change it only for reports.
The string wont be changed in any windows in the accounting system. To change
strings in windows, you must use the Modifier.

Modifying a string
Choose Strings from the Resources menu. The Strings window will open,
allowing you to select the string to edit.
The Microsoft Dynamics GP dictionary contains several thousand strings. The
Strings window may take a few moments to open.
1. Select the appropriate dictionary core.
String resources are divided into several cores, which are special
divisions in the dictionary. Microsoft Dynamics GP has a core for each
major module category. When locating a string, begin by choosing the
core that the string is most likely contained in. For example, the string
Customer is likely part of the Sales core, so begin looking there. If
you dont find a string in a particular core, look in the other available
cores.

USERS

GUIDE

133

PA RT

G L O B A L

M O D I F I C A TI O N S

2. Select the string to edit.


After you have located the string, select it in the list and click Open. The
String Definition window will appear, as shown in the following
illustration.
Edit the string and then
click OK to save the
changes.

3. Edit the string.


Edit the string in the String Definition window and click OK to save the
modified string.

134

U S E R S

G U I D E

Chapter 22:

Tables
Tables store data generated and used by applications. Tables use several
elements to store and access information properly, such as fields, keys and
table relationships. Information about tables is divided into the following
sections:

Table elements
Keys
Key segments
Key options
Segment options

Table elements
Each table has several names, a series, database type, table fields, keys, key
options, segment options, and table relationships. Use the Table Definition
window to view information about tables.
You can also use the Resource Descriptions tool to view information about tables.

Names
Three names are required for each table. The table name is the name that is
used in scripts to refer to the table.
The display name is the name that appears when the name of the table is
displayed on the screen in an application.
The physical name is the name under which the table is stored by the
operating system or database. The appropriate extension, if required, is
added automatically.

Table series
The table series groups related tables in the application together using
series categories like Sales, Financial, and System.

Database type
Tables can use the following database types: c-tree Plus, Pervasive.SQL, and
Microsoft SQL Server. If the setting Default is used, the application will
determine which database type to use at runtime, based upon several
system settings

USERS

GUIDE

135

PA RT

G L O B A L

M O D I F I C A TI O N S

Table fields
These are the fields that are stored in the table. The Record Size field in the
Table Definition window contains the total size of each record in the table.

Table relationships
Table relationships link related tables that share common information. Table
relationships are required to allow the Report Writer to access information
from multiple tables for a single report. Refer to Chapter 12, Table
Relationships, for more information about creating and using table
relationships.

Keys
A key is a field or combination of fields in a table used to sort and locate
specific records in the table. Typically, the value of the key field or fields is
unique for each record in a table so a specific record can be located. You will
use the keys for a table when you specify how report information is sorted.
You will also use keys when you create table relationships to link related
tables together.

Key segments
The Key Definition window shows the fields that make up the keys used to
sort, store, and retrieve records in each table. Each field in a key is referred
to as a key segment. Each table can have multiple keys, and each key can
have multiple segments.
For example, a customer table typically would have two keys defined for it.
One key could contain the Customer Name field, because this is the field a
user would most likely use to search for a record. However, a customer
name may not be unique. For instance, there may be more than one John
Smith. To avoid this problem, each customer could be assigned a unique
customer ID. A second key composed of the Customer ID field could be
added to the table. This key would uniquely identify customers, even if
they have the same name.
The Key Segments list displays the list of fields that will be used as
segments in the key. Records will be sorted primarily according to the first
key segment. Records that are identical for the first key segment will be
sorted again by the second key segment. For example, if the Key Segments
list contains two segments: [last_name, first_name], in that order,
records will be sorted primarily by the last name, and records with the same
last name entry would be sorted again by the first name.

136

U S E R S

G U I D E

C H A P T E R

2 2

T AB LE S

Key options
The database type specified for a table determines which sets of key options
are available for each key. The following key options are important to
understand in the Report Writer:
Duplicates Specifies whether multiple records in the table can have the
same key value. If this option is marked, new records that have the same
key values as records already in the table can be saved. If the option isnt
marked, new records with the same key values as existing records wont be
saved.
When you create a table relationship based a key that allows duplicate records, you
are creating a one-to-many relationship.
Create Index If this option for SQL tables is marked, an index in the SQL
database will be created for the table based upon this key definition. The
index contains a copy of the data in the keys key segments and pointers to
the associated records in the table. An index allows data to be retrieved
from the table more quickly.
If Create Index is marked, the following options are available:

Unique Marking this option ensures that the records in this table will
have unique values for this key.

Clustered Marking this option sorts and physically stores the data in
the table according to the order defined by this key. For example, the
Customer table has a key based upon the Customer Name field. If this
key was based on the Customer Name field, and the Clustered option
were marked for the key, the data in the Customer table would be physically stored in the order indicated by the key. Only one key per table
can have the Clustered option marked.

Segment options
The segment options specify how the key will handle the contents of the
selected key segment.
Descending This option specifies the order in which the records will be
sorted. If the option is marked, records will be sorted in order of highest
value to lowest (3, 2, 1 or c, b, a). If the option isnt marked, records will be
sorted lowest to highest (1, 2, 3 or a, b, c).

USERS

GUIDE

137

PA RT

G L O B A L

M O D I F I C A TI O N S

Ignore Case This option is available only if the selected segment is a


string field. The Ignore Case option specifies whether case determines how
the table will be sorted. If the option is marked, the case of the data in the
key segment wont affect the sorting process. If the option isnt marked,
uppercase characters will have a lower value than lowercase characters for
sorting purposes. This option does not apply for tables that use the SQL
database type.
The following table shows how a set of last names would be sorted,
depending upon how the Ignore Case option is marked.

138

U S E R S

G U I D E

Ignore Case marked

Ignore Case not marked

adams

Beaulieu

Beaulieu

JOHNSON

douglas

Jones

hagelle

Simpson

JOHNSON

adams

Jones

douglas

Simpson

hagelle

PART 6: PRINTING AND MAILING REPORTS

Part 6: Printing and Mailing


Reports
Once you have created or modified reports, you can print them or mail
them to other users. The following topics are discussed:

140

U S E R S

G U I D E

Chapter 23, Printing Reports, describes how to print modified and


custom reports.

Chapter 24, Mailing Reports, describes how to mail reports you have
created to other users.

Chapter 25, Exporting Data, explains how to use reports to export


data to external files for use in other applications.

Chapter 23:

Printing Reports
After you have created or modified a report, you will want to print and use
the report output. Information about printing reports is divided into the
following sections:

Printing modified reports


Printing custom reports
Printing in the Report Writer

Printing modified reports


To print modified reports from the accounting system, you need to set
appropriate access to them with system security. This is described in
Accessing modified reports on page 178. After you have set appropriate access
to the report, complete the following procedure to print the report:
1. Open a Reports window.
Most reports are accessed from the Reports menu, that appears in the
Microsoft Dynamics GP main menu. These same reports can also be
accessed from the Reports section of each Area page. Choose a report
from the menu or from an Area page. The Sales Setup Reports window
is shown in the following illustration.

Refer to the documentation for each module for detailed information about
printing specific reports.

USERS

GUIDE

141

PA RT

P R I N T IN G

A N D

M A I L I N G

R E P O R TS

2. Select the report to print.


In the Reports window, select report you want to print from the dropdown list.
3. Specify the report option to use.
Choose an existing report option in the Options list, or click New to
create a new report option. The report option specifies characteristics of
how the report will be printed, such as sorting and restrictions.
4. Set the characteristics of the report option (optional).
If you want to change the characteristics of how the report is printed,
such as sorting, restrictions, and output destination, click Modify to
modify the report options.
Refer to the online help for each report options window for more information
about setting options for a specific report.
5. Add the report to the list of reports to print.
With the report option selected, click Insert to add the report to the
Print List.
6. Print the report.
Click Print to print the reports in the Print List.

Printing custom reports


Custom reports are those that you created from scratch in the Report Writer,
or those that you created based on a copy of an existing report. To print
custom reports from the accounting system, you need to set appropriate
access to them with system security. This is described in Accessing custom
reports on page 179.
You can print custom reports from two places within Microsoft Dynamics
GP. The first is the Custom Report List, which is accessed from the
Administration group in the Navigation Pane. This report list will contain
all of the custom reports the current user has been granted access to. The
second location is the Custom Reports window. To print custom reports
through this window, complete the following procedure.

142

U S E R S

G U I D E

C H A P T E R

2 3

P R I N TI N G

R E P O R T S

1. Open the Custom Reports window.


In Microsoft Dynamics GP, choose Customized from the Reports menu.

Choose Customized to
open the Custom
Reports window.

The Custom Reports window will be displayed.

2. Select a product and series.


Select the product and series that contain the reports you want to print.
The custom reports in the specified product and series will appear in
the Custom Reports list.
3. Select the reports to print.
In the Custom Reports list, select the reports you want to print and click
Insert to add the report to the Print List. If you want to print reports
from another series, select the series and add additional reports.

USERS

GUIDE

143

PA RT

P R I N T IN G

A N D

M A I L I N G

R E P O R TS

4. Specify a destination for each report.


Select each report in the Print List and click Destination. In the Report
Destination window, specify whether you want to send the report to
the screen, the printer, or a file.
5. Print the reports.
Click Print to print all of the reports in the Print List to their specified
destinations.

Printing in the Report Writer


Printing reports from within the Report Writer is useful when youre
modifying reports or creating your own new reports. You can verify
changes youve made quickly.

Report security
To be able to print a report from within the Report Writer, you must have
been granted access to the report. This includes any custom reports the user
has created. If access isnt granted, the user will encounter a privilege
error when they try to display the report. Refer to Accessing modified reports
on page 178 and Accessing custom reports on page 179 for details about
granting access to reports.
If a user will be creating or modifying numerous reports in the Report Writer, you
may want to assign the user the POWERUSER security role. This role grants them
access to all of the custom reports they are creating.

Temporary tables
Most reports read data directly from tables in the database for the
accounting system. However, some reports retrieve their data from special
temporary tables that are created by the accounting system. Reports that
read data directly from tables in the database can be viewed and printed
from within the Report Writer. Reports that use temporary tables cannot,
because the Report Writer has no way to add data to temporary tables.
If you have selected the modified report in the Report Writer window, but
the Print button is disabled, the report uses temporary tables. This means
you cant print the report from within the Report Writer, and must return to
the accounting system to print the report.

144

U S E R S

G U I D E

C H A P T E R

2 3

P R I N TI N G

R E P O R T S

Report differences
Reports printed from within the Report Writer may not have exactly the
same appearance they would printed from the accounting system. Some of
the differences when reports are printed from the Report Writer include:

No legend values will be included on the report, because these must be


passed in by the application.

No additional restrictions will be applied to the report.

Records included on the report may be sorted in a different order.

USERS

GUIDE

145

146

U S E R S

G U I D E

Chapter 24:

Mailing Reports
You can send reports generated in Microsoft Dynamics GP to others as email attachments. Information about mailing reports is divided into the
following sections:

MAPI
Attachment types
Mailing a report

MAPI
The Report Writer allows you to mail reports using standard e-mail
applications. Microsoft Dynamics GP supports Microsofts Mail
Application Program Interface (MAPI), which allows you to send mail to
other users with a MAPI mailbox. If your workstation has one of these mail
systems enabled, you can mail reports from the Screen Output window.

Attachment types
Reports you send as e-mail attachments can be in text format or PDF
(Portable Document Format) format.

Text format
All reports can be mailed as a text attachment. The text representation of the
report generated by the Report Writer will match the report layout as
closely as possible. However, complex report layouts may not have an ideal
appearance. If you want to use the text attachment for reports you e-mail,
we suggest making a modified or custom report that is simplified and
designed to be represented with text.

PDF format
If you have the PDFWriter printer driver installed (included with Adobe
Acrobat 5 and earlier), or Acrobat Distiller from Acrobat 6 or later, you can
also mail the report as a PDF attachment. Information about Adobe Acrobat
is available at www.adobe.com. PDF provides a very accurate
representation of the report, and works well for graphics reports.

USERS

GUIDE

147

PA RT

P R I N T IN G

A N D

M A I L I N G

R E P O R TS

Mailing a report
To mail a report to another user, complete the following procedure:
1. Print the report to the screen.
Print the report as you normally would, but be sure to select the Screen
option in the Report Destination window when you print a report. The
Screen Output window will appear. If a users workstation has MAPI
enabled, the Send To button drop list will be enabled.
2. Choose to e-mail the report.
In the Send To button drop list, select the attachment type you want to
use. Text format will always be available. If you have the PDFWriter or
Acrobat Distiller installed, PDF format will also be enabled.
3. Address and send the message.
The report will have been attached to a new mail message. Address the
message and send the report.
If you chose a text attachment, the report will be sent with a .TXT
extension. The user receiving the report can use the application thats
associated with this extension to view the file. If you chose a PDF
attachment, the report can be read with Adobes Acrobat Reader.

148

U S E R S

G U I D E

Chapter 25:

Exporting Data
The Report Writer can be a useful tool for exporting data from the
accounting system to external files that can be used in other applications.
For example, a list of customer names and addresses could be exported to a
file for use with word processing software as a mailing list. Information
about exporting data is divided into the following sections:

Export formats
Creating reports for exporting

Export formats
The following export formats are available from the Report Writer:
Format

Description

Text file

The report will be saved as text without any formatting.


This option should be used when the application to which
youre converting the document is unable to read any of
the other file formats.

Tab-delimited

This is the tab-separated ASCII character format used by


programs such as Microsoft Excel.

Comma-delimited

This is the standard comma-separated ASCII character


format often used by database programs.

HTML

The report will be saved in HTML format to be viewed in a


web browser.

PDF File

This format is available if you have the Acrobat PDFWriter


print driver or Acrobat Distiller installed. PDF (Portable
Document Format) files can be read using the Acrobat
Reader software available from Adobe.

USERS

GUIDE

149

PA RT

P R I N T IN G

A N D

M A I L I N G

R E P O R TS

Creating reports for exporting


If you will be using reports to export data to a tab-delimited or commadelimited files, you must place fields in the report layout in a special way so
the export file has the proper format. The fields to export must be placed in
the body of the report, in the order they are to appear in the export file. The
following illustration shows the layout of a report to export customer
information. Notice that the report contains only the Body section.

Place the fields in the


order you want them
listed in the export file.

You must also add the ExportOneLineBody=TRUE setting to the defaults


file. This setting causes the items in the report body to be exported to a
single line in the export file. The following illustration shows the output file
when the report above is exported to a comma-delimited file.

150

U S E R S

G U I D E

PART 7: REPORT DESIGN

Part 7: Report Design


Good report design has several benefits such as making reports generate
more quickly, and making them more useful for the intended audience. The
following topics are discussed:

152

U S E R S

G U I D E

Chapter 26, Report Design Guidelines, provides a set of guidelines to


keep in mind as you create reports.

Chapter 27, Preprinted Forms, explains how to design reports to


work with preprinted forms.

Chapter 28, Groups, describes how to use groups on your reports to


organize information.

Chapter 29, Checks, Invoices, and Labels, describes special design


considerations when creating or modifying these types of reports.

Chapter 26:

Report Design Guidelines


This portion of the documentation contains information about designing
reports to improve their utility and optimize their performance.
Information is divided into the following sections:

Report design
Optimizing reports

Report design
A report is a tool that turns data into useful information. Careful design can
greatly improve the utility of the reports you create. Keep the following
guidelines in mind when creating reports.

Purpose
Before you begin creating a report, clearly state what the purpose of the
report is. State who will use the report and what they will use the report for.
This will help you determine what information is needed for the report, and
which tables the information will come from. This process can also provide
an early indication that a report is becoming too complex, or is trying to
meet several needs that would be better met by separate reports.

Name
The reports name is the primary way that users will be able to find the
report. Be sure the name is descriptive, and that the report is assigned to a
an appropriate series in the accounting system.

Layout and organization


Before opening the Report Layout window, its often useful to sketch the
layout of a report on paper. You will be able to see the sections of the report,
what information should appear in the headers, what summary
information you want to include in the footers, and so on. You can also
determine what calculations need to be performed with calculated fields.
This can save a lot of time when actually creating the layout. It can also
prevent cluttering the report with unnecessary fields.

USERS

GUIDE

153

PA RT

R E P O R T

D ES IG N

Remember some basics when creating the layout for a report:

Include page numbers and the current date on your report.

Determine whether the report should be printed in portrait or landscape mode, and be consistent with the layout.

If your report contains columns of information, be sure the data is properly aligned under the column headings.

Consider leaving enough room in the margin so the report can be


bound.

Fonts and graphics


A report is a printed document, so the principles of good page design apply
to reports as well:

154

U S E R S

G U I D E

Limit the number of fonts used for the report. Though you can use any
fonts installed on the current workstation, its best to limit the number
of fonts used to two.

Use common fonts. If you will be distributing reports to other users,


remember that they may not have the same set of fonts installed that
you did when you created the report. If a font isnt available, one will
be substituted, but the report may not have the appearance you
intended.

Graphic elements, such as lines and boxes, can help group the items in
a report and make it easier to read.

If you will be including company logos or other graphics in your


reports, be sure they look good and dont detract from the appearance
of the report. Refer to Guidelines for using logos on page 131 for information about enhancing the appearance of graphics in your reports.

C H A P T E R

2 6

R E P O R T

D E S I G N

G U I D EL I N E S

Optimizing reports
How you design and set up a report can directly impact the performance of
the report as its printed. Use the following guidelines to optimize the
reports you create.

Use text reports


Use text reports when you want maximum performance printing reports.
Text reports are simpler than graphics reports, so they print much faster.
The Report Writer has also been optimized for maximum performance
when printing text reports.

Page layout
An efficient page layout can improve performance by reducing the total
number of pages used to print the report. Dont use a landscape layout
unless the information on the report requires the wider format. Using
columns can also increase the amount of information on a page.

Keys and sorting order


When sorting the report, always try to use an existing key for the primary
table used on the report. It takes longer to generate a report when a separate
sorting order is used.

USERS

GUIDE

155

156

U S E R S

G U I D E

Chapter 27:

Preprinted Forms
You may have existing forms that are already printed, but that you would
like to have filled out by the Report Writer. These are typically referred to as
preprinted forms. The most common preprinted forms are checks and
invoices, which are described in Chapter 29, Checks, Invoices, and
Labels. Information about setting up your own preprinted forms is
divided into the following sections:

Report definition settings


Report layout
Printing preprinted reports

Report definition settings


Several settings are available for a report definition to allow using
preprinted forms with the Report Writer. The following settings apply to
preprinted forms:
Preprinted Form This setting allows you to remove the built-in margin
from the report layout, so you can print fields as close to the edge of the
form youre using as your printer permits. When this setting is marked,
items are printed on paper exactly where you placed them in the layout.
Six Lines Per Inch This setting allows you to specify that exactly six
lines of text will be printed in each inch of space on a text report. Many
preprinted forms are based on six lines per inch, so this makes it simpler to
match the report layout to the preprinted form.
This setting also prevents fonts from becoming too small when printed in
compressed text. The font will shrink in width so that each line of the report
will fit in the space available, but doesnt shrink in height so that more than
six lines of text will be printed in an inch.
First Page Header and Last Page Footer These settings typically
should be unmarked when you are using preprinted forms.

USERS

GUIDE

157

PA RT

R E P O R T

D ES IG N

Report layout
Careful planning is required when creating a report layout for use with a
preprinted form. The following hints that can help ensure success.

Page size
Keep in mind the total size of the page when youre creating the layout for a
preprinted form. A report layout is based on 72 points per inch, and each
pixel on the report layout represents one point. If you are developing a
preprinted report for standard US Letter size page, the total size for each
page of the report must be 612 by 792 points (8.5 inches by 11 inches).
Remember that there are no built-in margins for a preprinted report, so you must
account for any margins you need for your report.
To determine the total size for each page of a report, add up the sizes of
each section of the report. You can find the height of a report section by
clicking the handle for the section in the Report Layout window, and
viewing the section size at the bottom of the Toolbox.

If the total size of a page for a report is larger than the maximum page size,
extra pages will be generated when the report is printed. If a page only
slightly exceeds the maximum size, an extra blank page may appear in the
printed output. If the total size of a page for a report is smaller than the
maximum page size, the report may creep as it is printed. When a report
creeps, information on subsequent pages of the report will tend to move up
as pages are printed.

158

U S E R S

G U I D E

C H A P T E R

2 7

PRE P R I N TE D

F O RM S

Report sections
If the report for a preprinted form contains additional headers and footers,
its important to know exactly when these headers and footers will be
printed. If an additional header or additional footer is printed at an
unexpected time, your report may print extra pages or exhibit page creep. If
this occurs, check each section of the report to verify that they are printed
when expected.
You can use the Records Per Report Body setting in the Header Options or
Footer Options for a section to specify the total number of times the
additional header or footer will appear for each report body printed. This
setting limits the number of times a report section can print on a specific
page, and will also fill the page with the appropriate number of empty
sections to reach the number specified. This setting is useful for reports that
contain a fixed number of line items, such as invoices.

Special characters
For some preprinted reports, you may want to print special characters such
as Xs. To do this, you will need to create calculated fields that will print the
appropriate characters, based on field values for the report. Refer to
Chapter 7, Calculated Fields, for more information about creating
calculated fields.

Printing preprinted reports


When creating preprinted reports, you need to account for the unique
margin characteristics of individual printers. The Report Writer has a
provision for adjusting the horizontal and vertical offset of preprinted
reports when they are printed. These offset values appear in the Print
dialog displayed when you print a report.

USERS

GUIDE

159

PA RT

R E P O R T

D ES IG N

The horizontal and vertical alignment settings apply only to reports that
have the Preprinted option marked in the report definition. Other reports
arent affected by these settings.
A separate set of alignment settings for each printer you access is saved in
the DEX.INI file on each workstation, so you dont need to type in the
alignment settings each time you print a preprinted report. Because all
preprinted reports will use the same alignment settings for the selected
printer, its a good idea to use consistent left and top margins for all of the
preprinted reports you create. That way, users wont have to change the
alignment settings depending on the report being printed.

160

U S E R S

G U I D E

Chapter 28:

Groups
One way a report can transform data into useful information is by grouping
it into meaningful categories. For example, customer classes, credit limits,
or transaction amounts are just some of the ways you could group
information. Information about groups is divided into the following
sections:

Group overview
Sorting for groups
Group headers
Group footers
Counting items in a group
Counting groups
Totaling and subtotaling
Advanced groups

Group overview
To group information on a report, you will do the following:

Determine the items to appear in the group. Determine which table or


tables contain the information you want to appear in the group. List the
fields that you want to appear in the group, and the fields that will used
to determine the members of each group.

Sort the report data in an order appropriate for creating the group. You
need to sort the data for the report so that the report items appear in an
order that allows them to be grouped.

Create additional headers for each group category. Additional headers


for the report will contain the information that describes each group.

Create additional footers to summarize the group information. Additional footers for the report can perform summary actions such as totaling or subtotaling for each group.

USERS

GUIDE

161

PA RT

R E P O R T

D ES IG N

Sorting for groups


To create groups for a report, the information in the report must be sorted in
a way that allows the groups to be formed. This means the information for
the report must be sorted first by the primary field that identifies each
group, then by the items in the group. For example, if you are creating a
report that groups customers by state or province, the report must first be
sorted by the State field, and then by the Customer Name.

To group the report by State


or Province, the data for the
report must be sorted based
on the State field.

For optimal performance when printing the report, you should use an
existing key from the primary table to specify how the data for the report is
sorted. However, when you are creating groups for a report, there often
isnt a key available for the primary table that sorts the data appropriately.
This is especially true when you want to create groups based on data in
secondary tables for the report. In this case, you must create a sort order to
indicate how to sort the data for the report. This is described in Chapter 5,
Sorting.

Group headers
To add header information to a group, create an additional header for the
report. Refer to Chapter 8, Additional Headers and Footers, for more
information about creating additional headers. The additional header
contains the field or fields that each group is based on, and will be printed
once for each group on the report. It also typically contains descriptive
column headers for the information that appears in each group.

162

U S E R S

G U I D E

C H A P T E R

2 8

G R O U P S

For example, the following illustration shows the layout for the User
Classes report. Notice that user information is grouped according to the
User Class, and then Account Access, and so on. An additional header is
used for each group category for the report.

Group footers
Use footers for groups to add summary information for the group, such as
totals, subtotals, or average values. To add footer information to a group,
create an additional footer for the report. Refer to Chapter 8, Additional
Headers and Footers, for more information about creating additional
footers.
Any additional footers for a group should typically break on the same
field as any additional headers for the group. This keeps the headers and
footers with the group, and allows the items in the group to be counted.
When you add a field to an additional footer, it is automatically assigned
the Last Occurrence display type. If you dont use the Last Occurrence
display type, the field will appear to be looking ahead to the next record for
the report. This occurs because the next record for the report has already
been read to determine whether a group should be considered complete.
If you place calculated fields in footers, you change their display type from
Last Occurrence to Data, so that the calculations are performed properly.

USERS

GUIDE

163

PA RT

R E P O R T

D ES IG N

Counting items in a group


Its often useful to count the number of items that appear in each group on a
report. Counting the items in a group is done in an additional footer for the
group. The additional footer should be set up to print each time the main
category for the group changes. Place the field for the item you want to
count in the additional footer and set the fields type to Count.
For example, the Customers by State report lists all of the customers by
each state. To count the number of customers in each state, an additional
footer is added that is printed each time the State changes. A field that
occurs for each customer, such as the Customer Name is added to the
additional footer, and the display type is set to Count.

This additional footer is printed


each time the State field changes.
The Customer Name display type
is set to Count to count the
number of customers per state.

Counting groups
If you have several groups on a report, you may find it useful to count the
individual types of groups. To count the number of groups in a report, you
need to use a Control Count field.
A Control Count field is designed to count the number of times an
additional footer appears in a report. This means that the group you are
counting must have an additional footer that indicates the end of the group.
Next, create an additional footer immediately below the additional footer
that indicates the end of the group. This additional footer must contain an
instance of the field on which the group you are counting is based, and you
must set the fields type to Control Count.

164

U S E R S

G U I D E

C H A P T E R

2 8

G R O U P S

For example, the Customers by City and State report groups all of the
customers by State, and then further groups them by City. To count the
number of cities in each state, an additional footer is used that appears at
the end of each City group. Another additional footer is added that will
contain the City field, but with the display type set to Control Count. This
field will count the number of times the additional footer at the end of the
City group appears, which is the same as the number of cities for each state.

The report is grouped by


State, and then by City.
This additional footer is at
the end of each City group.
This display type is set to
Control Count, to count the
number of City groups.

The field to which you apply the Control Count display type must be the same field
that the footer immediately above the footer containing the Control Count field
breaks on.

Totaling and subtotaling


Another way to extract useful information from a report is by totaling or
subtotaling numeric values. You do this by adding fields that have the Sum
or Running Sum display type applied.

Sum fields
Fields with the Sum display type print the total of the fields values within a
group, or within the entire report. If you add a Sum field to an additional
footer for a group, it will total the items for the group. Adding Sum fields to
the report footer will total all values for the entire report.

Running sum fields


Fields with the Running Sum display type print the total of the fields
values at the point where they are placed in the entire report. They are often
placed in additional footers that occur throughout a report, or in the page
footer to allow running sum values to appear on each page.

USERS

GUIDE

165

PA RT

R E P O R T

D ES IG N

Advanced groups
Some groups for reports may be too complex to be implemented with the
basic additional header and additional footer capabilities of the Report
Writer. If you have the Modifier with VBA, you can use VBA (Visual Basic
for Applications) code to further control when additional headers and
footers appear in a report. Refer to the VBA Developers Guide for more
information about using VBA with the Report Writer.

166

U S E R S

G U I D E

Chapter 29:

Checks, Invoices, and Labels


Checks, invoices, and labels are common reports that have layouts that
require modifications with the Report Writer. This portion of the
documentation describes the design of these reports and provides
information about how the design affects the modifications you can make.
Information is divided into the following sections:

Checks
Invoices
Labels

Checks
Depending on the design of the checks you are using, the check layout can
be simple, or very complex. A basic check layout doesnt have a check stub,
or has the check stub either above or below the check. A complex check
layout has a check stub both above and below the check.

Check types
Microsoft Dynamics GP has separate check layouts for Payables
Management and for Payroll. For Payables Management, the following
table lists the check formats that are available, along with the corresponding
report used for the check.
Check Format

Report

No Stub

Check With No Stub

Stub on Top

Check With Stub on Top

Stub on Bottom

Check With Stub on Bottom

Stub Top/Bottom - Text

Check With Stub on Top and Bottom - Text

Stub Top/Bottom - Graphical

Check With Stub on Top and Bottom - Graphical

3 per Page/No Stub

3 Per Page/No Stub

User-Defined Check 1

User-Defined Check 1

User-Defined Check 2

User-Defined Check 2

USERS

GUIDE

167

PA RT

R E P O R T

D ES IG N

For Payroll, the following table lists the check formats that are available,
along with the corresponding report used for the check.
Check Format

Report

Stub on Top - Continuous

Employee Checks Stub on Top-D

Stub on Bottom - Continuous

Employee Checks Stub on Bottom-D

Stub on Top and Bottom - Single Feed Employee Checks Stub on Top and Bottom-L
Other - Continuous

Employee Checks Other-D

Other - Single Feed

Employee Checks Other-L

Modifying check layouts


Its likely that you will need to modify the check layout to work properly
with your check stock. Keep the following in mind when modifying check
layouts:

168

U S E R S

G U I D E

Avoid editing the layout for any Stub on Top and Bottom check. The
layout for these checks is hard-coded to the software, which prevents
most modifications from working properly. You can make some
cosmetic modifications to these check layouts, such as adding graphics
or text.

Consider modifying the User-Defined or Other check layouts.


These reports are designed to be customized. For Payables Management checks, the User-Defined Check 1 report is a stub on top layout.
The User-Defined Check 2 report is a stub on bottom layout.

When modifying checks, dont move fields from one section of a report
to another. This can cause the checks to not print properly.

Dont remove fields from the check layout. When youre modifying
checks, use the Report Field Options window to set a field to be invisible, rather than removing the field from the report. Removing fields can
prevent a check from printing properly.

C H A PT E R

2 9

C H E C K S ,

I N V O I C E S ,

A N D

L AB EL S

Invoices
Invoices are some of the most complex reports that are commonly modified.
They use several additional headers and additional footers to display line
items. Invoices must also print properly when they require only a single
page or span multiple pages.
Because of the complexity of modifying invoices, Microsoft has created
several modified versions of the invoices available in Microsoft Dynamics
GP. You can access these modified invoices in the Reports Library, which
contains reports have already had common modifications made to them.
You can access the Reports Library at the Microsoft Dynamics web site and
browse the modified invoices that are available there. Refer to Reports
Library on page 116 for more information about using the Reports Library.

Labels
Microsoft Dynamics GP can produce several types of labels, such as those
for customers, vendors, or employees. You can print labels by choosing
Company in the Reports menu, and then choosing Mailing Labels. The
Mailing Labels window will appear, allowing you select the labels you
want to print.
When you create the report option for the mailing labels, you must select
the format to use for the labels. You can choose Continuous or Laser. If you
choose Continuous, you can select the number of labels that will be printed
across the page. This value will range from 1 to 5. If you choose Laser, the
report will be printed with two labels across each page.
To have labels print properly on your printer and with your label stock, you
may need to make modifications to the layouts for the reports used to print
labels. The following table lists the reports that correspond the Format and
Number Across options you can specify in the Mailing Label Report
Options window.
Format

Number Across

Report

Continuous

Mailing Labels One Up

Continuous

Mailing Labels Two Up

Continuous

Mailing Labels Three Up

Continuous

Mailing Labels Four Up

Continuous

Mailing Labels Five Up

Laser

N/A

Laser Mailing Labels Two Up

USERS

GUIDE

169

PA RT

R E P O R T

D ES IG N

To easily select the appropriate mailing label report to modify, print the mailing
labels to the screen, and then choose to modify the current report.
If you are using the Laser format, and want to have more than two labels
across the page, you will need to use the Divider tool to add additional
columns to the report layout.

Use the Divider tool to


add additional columns to
the report layout.

When information is printed in columns, it will be printed from the left


column to the right column, and then down to the next row. This is shown
in the following illustration.

Record 1

Record 2

Record 3

Record 4

Record 5

Record 6

Record 7

Record 8

Record 9

When setting up mailing labels the first time, it is useful to test the layout
on blank paper before you print the actual labels. Its also a good idea to
print several pages of labels to verify that the labels arent creeping up or
down as multiple pages are printed. If this occurs, you will need to modify
the report layout to add or remove space from the report section containing
the labels.

170

U S E R S

G U I D E

PART 8: STORING AND ACCESSING REPORTS

Part 8: Storing and Accessing


Reports
This portion of the documentation contains information about how reports
you create or modify are stored and accessed. The following topics are
discussed:

172

U S E R S

G U I D E

Chapter 30, Storing Reports, explains how new and modified reports
are stored and describes two common Report Writer configurations.

Chapter 31, Accessing Reports, describes how to control access to the


Report Writer and to the reports that you have created or modified.

Chapter 32, Packaging Reports, explains how you can package and
distribute modifications to other users.

Chapter 33, Importing Reports, describes how to import reports from


another reports dictionary into the current reports dictionary.

Chapter 30:

Storing Reports
All new reports and modifications you make with the Report Writer are
stored in the Reports dictionary. Information about storing reports is
divided into the following sections:

Reports dictionary
Launch file
Report Writer configurations

Reports dictionary
All changes and additions you make using the Report Writer are stored in
the reports dictionary for the application. By storing the new and modified
resources in a separate dictionary, the integrity of the main dictionary can
be maintained. For example, the following illustration shows the dictionary
for Microsoft Dynamics GP and its associated reports dictionary.
New and modified
resources are stored in
the reports dictionary.
Dynamics

Reports.dic

When you access the Report Writer for the first time, all of the core resources
for the application dictionary are copied to the reports dictionary. Core
resources include strings, data types, and global fields that are used by
several parts of the system. Once core resources have been copied to the
Reports dictionary, the runtime engine will look there first when it retrieves
resources from the dictionary. Any additions or modifications you make to
core resources will be stored in the reports dictionary. The modifications
will be accessed automatically when you use Microsoft Dynamics GP.
When you create a new report, or select a report to modify, that report is
copied into the reports dictionary. Any modifications or additions you
make to that report will be stored only in the reports dictionary. To access
the modifications you make to reports, you must set security in the
accounting system to access the modified report. This is described in
Chapter 31, Accessing Reports.

USERS

GUIDE

173

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

Launch file
When you start Microsoft Dynamics GP, you use the launch file that tells the
runtime engine which dictionaries will be used by the application. The
launch file stores the location of the application dictionary as well as the
names and locations of any forms or reports dictionaries.
By default, the reports dictionary is named Reports.dic and is located in the
Data folder for the Microsoft Dynamics GP installation. You can use the
Edit Launch File window to change the name or location of the reports
dictionary.
To update the launch file, you must have appropriate user privileges. Typically, this
means being part of the Administrators group or the Power Users group on
Windows XP. On operating systems with User Account Control (UAC), it means
launching Microsoft Dynamics GP with Administrative privileges.
To display this window, choose Microsoft Dynamics GP >> Tools >> Setup
>> System >> Edit Launch File.

Select a product for which


you want to modify
dictionary locations.

You can change the


name of the reports
dictionary here.

To change the name or location of a reports dictionary, select a product such


as Microsoft Dynamics GP. Then edit the name or location of the reports
dictionary in the field at the bottom of the Edit Launch File window.
Be sure that you have correctly specified the name and location of the reports
dictionary. Otherwise, the accounting system may not start properly.

174

U S E R S

G U I D E

C H A P T E R

3 0

S T O R I N G

R E P O R T S

Report Writer configurations


Two common configurations are used with the Report Writer. One
configuration has the reports dictionary stored locally on each workstation.
In the other configuration, the reports dictionary is stored in a network
location accessible by all workstations.

Storing the reports dictionary locally


In this configuration, each workstation has its own reports dictionary.
Typically the reports dictionary is stored in the Data folder for the Microsoft
Dynamics GP installation. This configuration is also used for single-user
installations. This configuration has the following advantages:

Each workstation can have its own unique set of new and modified
reports.

Users can access the Report Writer at any time.

It has the following disadvantage:

New and modified reports cant easily be shared by multiple users.


This issue can be partially resolved by making modifications on one
workstation and then distributing the modifications to other workstations.

Storing the reports dictionary on a network


In this configuration, one reports dictionary is stored in a network location
that can be accessed by each workstation. This configuration has the
following advantages:

The same new and modified reports are available to all users.

Any new reports or modifications users make are available to other


users.

It has the following disadvantages:

Only one user can access the Report Writer at one time.

All workstations are dependent on a single reports dictionary. If this


dictionary is not available or becomes damaged, all users are affected.

Users cant have different sets of new or modified reports.

USERS

GUIDE

175

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

The configuration you choose depends on how many reports you want to
modify, whether individual users will be creating new reports or modifying
existing reports, and how you want to share new and modified reports
among users.

176

U S E R S

G U I D E

Chapter 31:

Accessing Reports
You can control access to the Report Writer and which new and modified
reports specific users will be able to use. Information about controlling
access is divided into the following sections:

Accessing the Report Writer


Accessing modified reports
Accessing custom reports
Accessing third-party reports
Removing modified reports

Accessing the Report Writer


The predefined security task ADMIN_SYSTEM_008 for Microsoft
Dynamics GP is used to control which users will be able to access the
Report Writer. Assign this security task to an existing role to grant access to
the Report Writer for users assigned to that role. You might also consider
creating a new security role for the Report Writer. Any user assigned to this
new role will be able to access the Report Writer.

Consider creating a new


security role that has
access to the Report
Writer task.

USERS

GUIDE

177

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

Accessing modified reports


If you want to view a modified report from within the application, you
must use the Alternate/Modified Forms and Reports window in Microsoft
Dynamics GP to grant access. To open this window, choose Microsoft
Dynamics GP menu >> Tools >> Setup >> System >> Alternate/Modified
Forms and Reports.

Mark the item to use


the modified version
of the report.

Complete the following procedure to specify that a modified report should


be used.
1. Specify the ID.
Select the ID for the set of forms and reports you are modifying. The
users that you want to view the modified version of the report must be
assigned to use the set of modified/alternate forms and reports you
selected. The User Security Setup window is used to specify the set of
modified/alternate forms and reports for each user.
2. Select the product containing the modified report.
This is the product in which the report was originally defined.
3. Choose to display reports.
Choose Reports as the type of resource to display. The tree view will be
filled with the modified reports available.
4. Locate the modified report.
Expand the nodes in the tree view to locate the report that you
modified. The reports are organized by series.

178

U S E R S

G U I D E

C H A P T E R

3 1

A C C E S S I N G

R E P O R T S

5. Choose to use the modified report.


The original and modified versions of the report will be listed. Mark the
modified version.
If you later wanted to use the original version of the report, you would mark
the original report instead.
6. Save the changes.
Click Save to save the changes.
After you have set access to the modified report, print it as you typically
would. Be sure the user printing the report is assigned to the appropriate
set of modified/alternate forms and reports. For more information about
printing reports, refer to Part 6, Printing and Mailing Reports.
Be sure to activate security once you've made your selections by marking
the Security option in the Company Setup window in Microsoft Dynamics
GP. When the user chooses to display the report, the modified version of
the report will be displayed instead.
Changes made to core resources like strings and data types are seen by all users.

Accessing custom reports


Custom reports are new reports or copies of existing reports that you have
created with the Report Writer. To control access to a custom report, you
must create a security task for the custom report. Use the Security Task
Setup window to do this.

USERS

GUIDE

179

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

To open this window, choose Microsoft Dynamics GP menu >> Tools >>
Setup >> System >> Security Tasks. Name the new security task. Select the
product for which the custom report was defined. Select Custom Reports as
the resource type, and choose the series. The custom reports in the selected
series will be shown. Mark the custom reports to include in the new task.
Once the task is defined, you can assign it to a new or existing security role.
Any user assigned to that role will be able to access the custom report.
Be sure to activate security by marking the Security option in the Company Setup
window in Microsoft Dynamics GP.

Accessing third-party reports


You can use the Report Writer to make changes to forms that are part of
third-party products created with Dexterity. Dexterity is the tool used to
create Microsoft Dynamics GP. If you have third-party products that
integrate with Microsoft Dynamics GP, you will be asked which product
you want to modify when you start the Report Writer. When you choose a
third-party product, you will be modifying reports for that product.
If you have integrating
products, use this window
to select the product
whose reports you want
to access.

Modified reports
Any modifications you make to the reports for a third-party product will be
stored in a separate reports dictionary for that product. To access these
modified reports, you must select the third-party product in the Alternate/
Modified Forms and Reports window. You can then choose to use the
modified version of the report.

180

U S E R S

G U I D E

C H A P T E R

3 1

A C C E S S I N G

R E P O R T S

This is a modified version of


the Equipment Status List
report in the Field Service
third-party application.

Alternate reports
Some third-party developers create alternate reports. These are Microsoft
Dynamics GP reports that the third-party developer has enhanced and
transferred to their own dictionary. By choosing the third-party dictionary
when you start the Report Writer, you can make modifications to these
alternate reports.
When using the Alternate/Modified Forms and Reports window to set
access to these reports, choose the modified version of the alternate report
to display the modifications you made. For example, the following
illustration shows how you would display a modified version of the
alternate Purchase Order History Report provided by the Purchase Order
Enhancements dictionary.

This is the modified


alternate version of the
Purchase Order History
Report.

USERS

GUIDE

181

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

Removing modified reports


If you remove a modified report from the Reports dictionary, be sure that
you change the security settings to use the original report rather than the
modified report. Otherwise, Microsoft Dynamics GP will not be able to
properly access the report.

182

U S E R S

G U I D E

Chapter 32:

Packaging Reports
When you have finished modifying existing reports or creating new
reports, you may want to distribute them to other users. This portion of the
documentation describes how you can use package files to distribute new
and modified reports. Information is divided into the following sections:

Package files
Exporting a package file
Importing a package file
Package file import/export issues

Package files
Package files are special text files that are used to deliver customizations
made with the Modifier, VBA, and the Report Writer. A developer can
create a package file that contains their customizations, move the package
file to the destination workstation, then import the customizations into the
installation.
A package file can contain the following items:
Modified forms Forms that have been customized with the Modifier.
New or modified reports Reports that have been created or
customized with the Report Writer.
VBA forms Forms that have VBA code attached.
VBA reports Reports that have VBA code attached.
VBA components User forms, code modules, or class modules created
with the VBA development environment.
References References to external components used by VBA. A package
file cannot contain the actual components referenced by the VBA
customization. Those components must be delivered separately.

USERS

GUIDE

183

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

Exporting a package file


Package files are created using the Customization Maintenance window.
Complete the following procedure to create a package file.
1. Open the Customization Maintenance window.
Open this window by pointing to Customize in the Tools menu and
choosing Customization Maintenance.

2. Select the components needed for the customization.


The Customization Maintenance window lists all of the components
that have been customized with the Modifier, Report Writer, or VBA.
Select all of the components that are required for your customization.

Select all of the


components that are part
of the customization.

To select non-contiguous items in the list, hold down the CTRL key and click the
items.
Click Export. A file dialog will appear, allowing you to specify the
name of the package file. Be sure the file has the .package extension.
The results of the export operation will be displayed in the status area
at the bottom of the window.

184

U S E R S

G U I D E

C H A PT E R

3 2

P AC K AG I N G

R E P O R T S

Note that some global changes you make with the Modifier and Report Writer
cant be included in a package file. For instance, changes to picture resources or
global data types wont be included in package files.

Importing a package file


To import the contents of a package file, complete the following procedure.
1. Open the Customization Maintenance window.
Open this window by pointing to Customize in the Tools menu and
choosing Customization Maintenance.
2. Open the Import Package File window.
Click Import in the Customization Maintenance window to display the
Import Package File window.
3. Select the package to import.
Click Browse to open a file dialog that allows you to select the package
file you want to import. The contents of the package will be displayed
in the Import Package File window.

An X in the Overwrite column indicates that a customized version of


a component already exists for the system, and will be overwritten by
the contents of the package file. Refer to Package file import/export issues
on page 186 for details about overwriting existing customizations.
If any of the package file items contain VBA code, the user importing them
must have appropriate user privileges to update the .vba files in the Microsoft
Dynamics GP installation. Typically, this means being part of the
Administrators group or the Power Users group on Windows XP. On
operating systems with User Account Control (UAC), it means launching
Microsoft Dynamics GP with Administrative privileges.

USERS

GUIDE

185

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

Click OK to start the import process. If any errors occur during the
import process, the Errors window will be displayed. The results of the
import operation will also be displayed in the status bar of the
Customization Maintenance window. To view the list of the last errors
that occurred, click the Errors button in the status bar.
4. Set access to any modified forms or reports that are part of
the customization.
If necessary, use the security features in Microsoft Dynamics GP to
grant access to any modified forms or modified reports that are part of
your customization.

Package file import/export issues


There are some additional issues you need to be aware of when importing
and exporting package files, concerning how customized resources are
stored by Microsoft Dynamics GP.
Microsoft Dynamics GP contains forms, which are groups of windows,
menus and other resources that work together for a common purpose. A
form can have several windows, but you can make customizations to
individual windows with the Modifier and VBA. When you export a form
to a package file, you are exporting all of the windows in that form, not just
the windows you modified or applied VBA code to.
This fact is important to keep in mind when you import a package file that
contains customized forms. If a customized version of the form already
exists in the system and you import another set of customizations for that
same form, the original customizations will be overwritten. This occurs
even if the customizations are made for different windows in the form.
A similar issue occurs for reports. If youve made customizations to a
report, then import a package that contains customizations for that same
report, the existing customizations will be overwritten.
A warning message is automatically displayed allowing you to cancel an import
operation that will overwrite existing customizations.

186

U S E R S

G U I D E

Chapter 33:

Importing Reports
In versions of the Report Writer prior to Release 6, the only way to move a
report from one reports dictionary to another was to use the Import Reports
capability. Information about importing reports is divided into the
following sections:

Importing from a reports dictionary


Validating reports

Importing from a reports dictionary


The Import Reports capability allows you to open a reports dictionary from
another installation of Microsoft Dynamics GP and import reports into the
reports dictionary for the current installation.
The Import Reports capability is no longer the preferred method for transferring
reports from one reports dictionary to another. Instead, we recommend that you use
package files, as described in Chapter 32, Packaging Reports.
To import reports, use the following procedure:
1. Start the Report Writer.
If it isnt already running, start the Report Writer.
2. Open the Report Writer window.
Click the Reports button on the toolbar to open the Report Writer
window.
3. Open the Import Reports window.
Click Import in the Report Writer window to open the Import Reports
window.
4. Select the reports dictionary to import from.
Click the Source Dictionary lookup button to select the reports
dictionary from which you want to import.
Its important that both the source dictionary and the destination dictionary be
based on the same version of the Microsoft Dynamics GP dictionary, and that
they use the same account framework. Otherwise, reports may not be imported
correctly.

USERS

GUIDE

187

PA RT

S T O R I N G

A N D

A C C E S S I N G

R EP O R T S

5. Select the reports to import.


In the Source Dictionary Reports list, select the reports you want to
import, and click Insert.
6. Import the reports.
Click Import to import the reports you have selected.

This is the list of reports


you can import into the
current reports dictionary.

Click Import to import the


selected reports.

7. Close the window.


After you have finished, click Close to close the Import Reports
window.
8. Validate the reports.
We recommend that you perform a validate operation on any reports
you have imported.

Validating reports
After you have imported reports from another reports dictionary, its
important to verify that the reports references to tables and other resources
are still valid. To validate a report, use the following procedure:
1. Select the report.
In the Report Writer window, select the report to validate in the
Modified Reports list.
2. Validate the report.
Click Validate in the Report Writer window to validate the selected
report.

188

U S E R S

G U I D E

C H A P T E R

3 3

I M P O R TI N G

R E P O R T S

3. View the validation results.


The Validation Results window will appear, listing any invalid
references that were found. If invalid references were found, you must
correct them before the report will run properly. The following table
lists the messages that may be displayed, and describes what is causing
the issue.
Message

Cause

No invalid references found

The report contains only valid


references, so no changes are required.

Report XXX: Report XXX references a


field that does not exist in table XXX.

A field in the layout of the specified


report no longer exists in the specified
table.

Report XXX: Restriction XXX references


a field that does not exist in table XXX.

A field in the restriction definition for the


specified report no longer exists in the
specified table.

Report XXX: Expression XXX references A table field thats used as part of a
a field that does not exist in table XXX. calculated or conditional expression no
longer exists in the specified table.
Report XXX: Field XXX in sort segment
not in table XXX.

A field in the sorting method for the


specified report no longer exists in the
specified table.

Report XXX: Field XXX in header is not


part of table XXX.

A field in the specified header no longer


exists in the specified table.

Report XXX: Field XXX in footer is not


part of table XXX.

A field in the specified footer no longer


exists in the specified table.

USERS

GUIDE

189

190

U S E R S

G U I D E

PART 9: WORD TEMPLATES

Part 9: Word Templates


This portion of the documentation contains information about producing
report output in Microsoft Word format. The following topics are discussed:

192

U S E R S

G U I D E

Chapter 34, Overview of Word Templates, provides a general


description of how Word templates work.

Chapter 35, Setting Up Microsoft Word, describes how to set up


Microsoft Word to work with Word template documents.

Chapter 36, Report Template Design, describes the structure of a


report template document, and provides details about how to design
one.

Chapter 37, Creating Report Templates, explains how to create a


report template document for a report.

Chapter 38, Report Templates for Modified Reports, describes how to


create a report template document for a report that you have modified
in Microsoft Dynamics GP.

Chapter 39, Troubleshooting Templates, provides solutions to common problems when you are working with report document templates.

Chapter 34:

Overview of Word Templates


In Microsoft Dynamics GP, the Report Writer is used to render the output of
most reports. Beginning with Microsoft Dynamics GP 2010, several reports
can also be rendered in Microsoft Word format. General information about
Word templates is divided into the following sections:

Template-enabled reports
Report definition
Report template document
How Word Templates are processed
Capabilities of Word templates

Template-enabled reports
Template-enabled reports are Report Writer reports that can have Microsoft
Word report template documents associated with them. When these
template-enabled reports are printed, the appropriate Microsoft Word
report template document is retrieved and used to render the output in
Microsoft Word format. The template-enabled reports are listed in the
Reports window in Microsoft Dynamics GP.

The Report Writer


reports that can be
rendered by Microsoft
Word are listed here.

USERS

GUIDE

193

PA RT

WO R D

TE M P L AT E S

For a report to be template-enabled, the Microsoft Dynamics GP application


or Dexterity-based integration must contain the code necessary so the
Microsoft Word document to be used as the template for generating the
report can be retrieved. Refer to the Microsoft Dynamics GP Integration
Guide included with Microsoft Dexterity for details about how to make a
report template-enabled.

Report definition
A report that is rendered as a Microsoft Word document is still based on a
standard report definition in the Report Writer. The report definition is
needed for things like:

Defining which tables are used for the report


Specifying how data is sorted
Determining which sections the report has
Specifying which fields are in each section
Defining calculated values that appear on the report

Microsoft Word does not perform any of these standard report actions. It is
used only to display the report that has been rendered in Microsoft Word
format.

Report template document


The report template document defines the layout of a report. It is a standard
Microsoft Word 2007 document that also contains the report definition
details, such as the sections in the report, the fields in each section, and the
static text values defined for the report. This information is gathered from
the report definition, and then embedded into the report template
document when the document is created.
The Microsoft Word Add-in for Microsoft Dynamics GP is used to access
this report definition information in the report template. It makes the
information available so it can be used when the layout of the report
template document is defined.

194

U S E R S

G U I D E

C H A P T E R

3 4

O V E R V I EW

O F

W O R D

T EM PL AT E S

How Word Templates are processed


When you run a report that is template-enabled, and at least one Microsoft
Word report template document has been assigned to the report, the Report
Destination window will have the Template choice available in the Report
Type drop-down list.

Beginning with Microsoft Dynamics GP 2010 R2, choosing Template when no


report template is assigned will display the HTML version of the report.
When you choose Template as the Report Type, the assigned Microsoft
Word document will be used to generate the output of the report. The
following illustration shows the basic process used to process the report.
Report Definition in
Microsoft Dynamics GP

XML Document
Contains Report Definition
and Data

Microsoft Word Template


for the Report

Template Processing
Engine

Completed Report in
Microsoft Word

USERS

GUIDE

195

PA RT

WO R D

TE M P L AT E S

The Microsoft Dynamics GP runtime uses the report definition for the
report to generate an XML document that contains both the report
definition and the data for the report. The appropriate Microsoft Word
report template document that was created for the report is retrieved. This
template document defines how the data in the report is to be rendered. The
XML and template documents are passed to the Template Processing
Engine, which combines them to produce the completed Microsoft Word
document for the report.

Capabilities of Word templates


Rendering the output for a report in Microsoft Word format provides
several improvements over the capabilities of the Microsoft Dynamics GP
Report Writer rendering engine. These include:

Support for any font.

Better graphics support for images such as logos.

Support for Microsoft Word features such as watermarks.

Portability of the report. Any user with Microsoft Word can view the
report.

Microsoft Word is not designed to have the features of a report writer. The
following is a list of the capabilities of the Microsoft Dynamics GP Report
Writer rendering engine that are not available in the reports generated in
Microsoft Word format:

196

U S E R S

G U I D E

No running sums on pages

No page headers or page footers in the report. All page headers and
page footers must be implemented using feature provided by Microsoft
Word.

Chapter 35:

Setting Up Microsoft Word


You will use Microsoft Word 2007 or later to create or modify the Word
template documents used for reports. A Microsoft Word add-in and some
additional configuration is needed to allow Microsoft Word to perform
these actions.

Add-in for Microsoft Word


Microsoft Word settings

Add-in for Microsoft Word


The Microsoft Dynamics GP Add-in for Microsoft Word is used when
creating the layout of the Word template document for a report. You need it
only if you are going to modify existing Word template documents or create
new Word template documents.
This add-in is an additional product that can be installed. It is accessed from
the main Microsoft Dynamics GP installer.

The Microsoft Word


add-in is an additional
product that can be
installed.

After installing the Microsoft Word add-in, you access it through the
Developer tab in the Ribbon. To display the Developer tab, go to the Office
menu and choose Word Options. In the Word Options window, select the
Popular category. Mark Show Developer Tab in the Ribbon, and then click
OK.

USERS

GUIDE

197

PA RT

WO R D

TE M P L AT E S

The following illustration shows the group that is added to the Ribbon.

The Microsoft Dynamics GP Add-in is used to add fields, captions, and


legends from the various sections of the report to the report template
layout. It is also used to work with the data sources (report definition
information) that is embedded in the report template document.

The Microsoft Dynamics GP


Add-in is used to add fields,
captions, and legends to the
report template layout.

198

U S E R S

G U I D E

C H A P T E R

3 5

S ET T I N G

U P

M I C R O S O F T

W O R D

Microsoft Word settings


We suggest you make the following settings in the Word Options window
of Microsoft Word to help you see the layout structure of the report
template documents and make editing them easier. To open the Word
Options window, go to the Office menu and choose Word Options.

Display options
In the Word Options window, select the Display category. Mark the
following options:

Paragraph marks
Hidden text
Object anchors

Advanced options
In the Word Options window, select the Advanced category. Mark the
following options:

Show bookmarks
Show text boundaries

USERS

GUIDE

199

200

U S E R S

G U I D E

Chapter 36:

Report Template Design


The report template documents that are used for rendering reports in
Microsoft Word format must conform to several guidelines so that they can
be processed by the template processing engine. The following sections
describe how a report template document is designed:

Document structure
Creating a report template layout with tables
Fields, captions, and legends
Bookmarks
Company image
Tips for working with report template documents
Common report template patterns

Document structure
The report template document is a standard Microsoft Word document.
When it is created from with Microsoft Dynamics GP, the additional
information about the report definition is embedded into the document.
The document is a single-sided, which means that there are no left-hand or
right-hand pages.
Several tables in the report template document define the overall structure.
All of the content that is displayed in the generated Word document is
placed inside these tables. The following illustration shows the structure of
a report template document.

Word Document Header

Page Header

Report Header

Word Document Body

Body

Report Footer

Word Document Footer

Page Footer

USERS

GUIDE

201

PA RT

WO R D

TE M P L AT E S

Any text that is not within one of these single-cell tables will not be
included in the generated Microsoft Word document for the report. It is
common to add text to the document in the areas outside of the single-cell
tables to describe the report template.

Page header table


The page header table is a table that is placed in the header of the Microsoft
Word document. This corresponds to the page header for a standard Report
Writer report. Because it is in the header of the Microsoft Word document,
the content of the page header table is displayed at the top of every page of
the generated report.

Report header table


The report header table is a table that is located at the beginning of the
Microsoft Word document. This corresponds to the report header for a
standard Report Writer report. The content of the report header table is
displayed only one time at the beginning of the generated report.

Body table
The body table is a table that is located after the report header table of the
Microsoft Word document. It contains the main content of the report. This
includes the report body content, any additional headers, and any
additional footers.

Report footer table


The report footer table is a table that is located at the end of the Microsoft
Word document. This corresponds to the report footer for a standard Report
Writer report. The content of the report footer table is displayed only one
time at the end of the generated report.

Page footer table


The page footer table is a table that is placed in the footer of the Microsoft
Word document. This corresponds to the page footer for a standard Report
Writer report. Because it is in the footer of the Microsoft Word document,
the content of the page footer table is displayed at the bottom of every page
of the generated report.

202

U S E R S

G U I D E

C H A P T E R

3 6

R E PO R T

T EM PL AT E

D ES IG N

Creating a report template layout with tables


Tables are used to create the layout of the report template. The rows and
columns create the table cells where the report data can be placed. You will
add the fields, captions, and legends from the report to these table cells.
Each report field, caption, and legend value should be in its own table cell.
For example, the following illustration shows a caption and a report field in
the page header table of a report template. Notice how each is placed in its
own table cell.

Page header and page footer tables


The page header and page footer tables, located in the header and footer of
the Microsoft Word report template document, contain the values that come
from the ReportHeader section and ReportFooter section of the report
definition. Things like the report date and current user are included in these
tables. A typical page header table is shown in the following illustration.

Report header and report footer tables


The report header and report footer tables, located at the beginning and end
of the Microsoft Word report template document, contain values from the
ReportHeader and ReportFooter section of the report definition. Values that
are displayed only one time, such as sorting criteria, are placed in this table.
A simple report header table is shown in the following illustration.

USERS

GUIDE

203

PA RT

WO R D

TE M P L AT E S

Body table
The body table is located between the report header and report footer tables
in the Microsoft Word report template document. It contains values from
the Body section, and from any additional header and additional footer
sections of the report definition.
The body table has multiple rows. The table has one row for the actual
report body. There is also one row for each additional header and one row
for each additional footer. There can also be a rows that are used for
captions, such as column headers.
Typically, additional tables are used within the rows of the body table to create the
layout for the row.
A basic body table is shown in the following illustration. The first row in
this body table contains captions for the column headings. The next row
contains data for an additional header. The third row contains data from the
report body. The last row contains data for an additional footer.

The row of the body table that contains items from the report body must
have a special Microsoft Word bookmark that the template processing
engine in Microsoft Dynamics GP uses to identify this row. You can see this
bookmark located on the left side of the body row in the previous
illustration. Refer to Bookmarks on page 207 for details about adding
bookmarks to the report template document.
As Microsoft Dynamics GP processes the report, it examines the report data
to determine when the rows from the body table are included in the
generated output for the report. For example, when the data for an
additional header is encountered for a report, that row is included in the
generated output.
If the body table contains a row with column headers, this row of the body
table should be set to repeat as the header row at the top of each page. This
is a Microsoft Word feature that is applied to a specific row of the body
table.

204

U S E R S

G U I D E

C H A P T E R

3 6

R E PO R T

T EM PL AT E

D ES IG N

Fields, captions, and legends


After the tables that define the overall structure of the report template
document have been created, you will add fields, captions, and legends.
The Microsoft Dynamics GP Add-in for Microsoft Word is used to do this.

Adding an item
To add a field, caption, or legend, complete the following steps:
1. Display the Developer tab.
2. Click Field List in the Microsoft Dynamics GP group.
The Custom XML Mapping pane will be displayed. This pane provides
access to the report definition data that was embedded into the report
template document when it was created.
3. Select an XML resource.
In the drop-down list in the Custom XML Mapping pane, select the
XML resource for the report. Typically, there is only one XML resource.
The Report Section list will be filled with the sections in the report.
4. Select a report section.
Select the section of the report from which you want to add items. The
Fields list will be filled with the fields, captions, and legends that are
contained in that section from the report definition.

These are the items found


in the selected section of
the report definition.

USERS

GUIDE

205

PA RT

WO R D

TE M P L AT E S

5. Add items to the layout.


Drag items from the Fields list to the cells in the layout of the report
template document. Caption items will display the text of the caption.
Other fields will display placeholder characters that show the
maximum length of the data in the field.
Use the guidelines in the following table when deciding which section
of the Field List in the Custom XML Mapping pane to drag items from
when you place them in the layout of the report template.
Location in report template

Source in Field List

Page Header table

ReportHeader

Report Header table

ReportHeader

Body table

Body
AdditionalHeaders
AdditionalFooters

Report Footer table

ReportFooter

Page Footer table

ReportFooter

If you place items from the field list into an inappropriate location in the report
template, their values will not appear in the generated report.
6. Specify the appearance of the item.
Use the standard features of Microsoft Word to specify characteristics
like the font, style, and alignment.

Removing an item
To remove a field, caption, or legend, complete the following steps:
1. Click on the item in the document.
The tag containing the name of the field will be displayed.

Click on the item to select it.

2. Click on the tag.


Click the tag to select it.
Click on the tag to select it.

206

U S E R S

G U I D E

C H A P T E R

3 6

R E PO R T

T EM PL AT E

D ES IG N

3. Remove the item.


Press the Backspace key to remove the item from the report template
layout.

Displaying item properties


You may want to view the properties of a field, caption, or legend after it
has been added to the report template document. The properties of an item
show you what section of the report data the item originated from.
To display the properties, click on the item in the document. In the
Developer tab, click Properties.

The Tag indicates the


section of the report
definition the value of the
item is from.

Bookmarks
Microsoft Word bookmarks are used to identify three of the tables that
define the structure of the report template document. The following table
lists these bookmarks.
Bookmark

Description

StartTemplateDocumentHeaderBookmark

This bookmark identifies the Page Header


table. The bookmark is placed inside the
table located in the header of the report
template document.

StartTemplateSectionRepeating

This bookmark is located within one row


of the Body table of the report template
document. It identifies what row of the
Body table will be repeated for each record
of the report.

EndTemplateDocumentFooterBookmark

This bookmark identifies the Page Footer


table. The bookmark is placed inside the
table located in the footer of the report
template document.

USERS

GUIDE

207

PA RT

WO R D

TE M P L AT E S

Every report template document must have the StartTemplateSectionRepeating


bookmark defined for the template to work properly.
You must define these bookmarks in Microsoft Word, and then insert them
into the report template document in the appropriate locations.

These bookmarks
must be defined in
Microsoft Word.

To be found by the template processing engine in Microsoft Dynamics GP,


these bookmarks must not be located within the fields, captions, or legends
used for the report.
Some of the report template documents for reports in Microsoft Dynamics GP, have
bookmarks that are named StartTemplateDocumentBookmark and
EndTemplateDocumentBookmark. These bookmarks are used only for
calculating page numbers for these reports. They do not identify tables in the report
template document.

Company image
Each company in Microsoft Dynamics GP can have an image assigned that
is to be displayed on the Microsoft Word template reports. When you run
the report for a specific company, the image assigned for that company will
be displayed on the generated document. Typically, this logo is placed in
the Page Header table for the report template document. To add a company
image to a report template, complete the following steps:
1. Create a cell to contain the image.
In the report template document, create a table cell in the location
where you want the image to appear.

208

U S E R S

G U I D E

C H A P T E R

3 6

R E PO R T

T EM PL AT E

D ES IG N

2. Add a Picture Content Control.


Display the Developer ribbon in Microsoft Word. In the Controls group,
choose to insert a Picture Content Control.
3. Set the picture size.
Use the resize handles on the Picture Content Control to the size
required for your report template document.
4. Set the picture properties.
With the Picture Content Control selected, click Properties in the
Controls group. Set the following properties:
Title Set this property to CompanyLogo
Tag Set this property to globals.'Company Logo'

Click OK.

Tips for working with report template documents


Keep the following tips in mind when working with report template
documents in Microsoft Word.

Get the basic report template layout working first. Do the intricate
layout work such removing extra space and aligning data values after
the report template is retrieving data and displaying it correctly.

Press and hold the Alt key when moving table borders to prevent them
from snapping to the grid in Microsoft Word.

Use the Design Mode that can be activated from the Developer tab to
see quickly which sections the items in the report template layout come
from.

Make regular backups of your template as you are working, in case you
make a change that you would like to revert.

USERS

GUIDE

209

PA RT

WO R D

TE M P L AT E S

Common report template patterns


Two common patterns are used when creating a report template document
layout. You can use these patterns as a base for creating your own report
template documents.

Form pattern
In the form pattern, the data is displayed as a block of values for each
record in the table. The block typically contains several pairs of labels and
data values that are arranged in the block. The following illustration shows
this pattern.

Page Header table

Report Header table

StartTemplateSectionRepeating
bookmark
Nested table inside the
Body table, with multiple
rows and columns
containing the data from
each record.

xxx
xx

xxx
xxxxx

xx

xxxxx

x
xx
xxxx xxxxx
xxx xxx

Body table (single-cell)

Report Footer table (optional)

Page Footer table (optional)

The layout has the following characteristics:

The Body table in the layout is a single cell.

The Body table has another table nested in it that contains the rows and
columns that define the layout of the data.

The captions and fields for the report are placed in the cells of the
nested table.

The StartTemplateSectionRepeating bookmark is placed in a cell of the


nested table to indicate that the entire single-cell row of the Body table
will be repeated for each record in report.

The Body table may also have rows for additional headers and additional
footers. The Report Footer table and Page Footer table are optional in this
pattern.

210

U S E R S

G U I D E

C H A P T E R

3 6

R E PO R T

T EM PL AT E

D ES IG N

Column pattern
In the column pattern, the data for the report is divided into columns, with
one row for each record in the table. A set of column headers appears at the
top of each page. The following illustration shows this pattern.

Page Header table

The first row of the Body


table contains the captions
for the columns. The row is
set to repeat each page.
Additional header rows (if needed)
StartTemplateSectionRepeating bookmark
Additional footer rows (if needed)

Report Header table


xx

xxxx

xxxxx

xxx

xxx

xxx

xxxxx

xxxxx

Nested table inside one


row of the Body table,
with multiple columns
containing the data from
each record.

Body table

Report Footer table (optional)

Page Footer table (optional)

The layout has the following characteristics:

The first row of the Body table is divided into columns that contain the
captions for the values in the report. The properties for the row are set
in Microsoft Word to make the column repeat at the beginning of each
page.

The Body table can contain rows for additional header data and
additional footer data.

The Body table has a row that contains a nested table. This nested table
is divided into columns, and the fields for the report are placed in these
columns.

The StartTemplateSectionRepeating bookmark is placed in a cell of the


nested table to indicate that the entire row of the Body table will be
repeated for each record in report.

The Report Footer table and Page Footer table are optional in this pattern.

USERS

GUIDE

211

212

U S E R S

G U I D E

Chapter 37:

Creating Report Templates


You can create your own report template documents for reports.
Information about how to do this is contained in the following sections:

Overview of creating report template documents


Creating a new report template document

Overview of creating report template documents


Microsoft Dynamics GP contains several reports that have report template
documents already defined for them. You can create additional report
template documents for these reports. These additional report template
documents are created to be used with specific companies, customers, or
vendors. Third-party integrating applications may also have reports that
you can create additional report template documents for.
Microsoft Dynamics GP and third-party integrating applications can have
reports that are template-enabled, but that do not have any report template
documents defined for them. You can create report template documents
that can be used with these reports, which allows them to generate the
report in Microsoft Word format.
For information about how to make a report template-enabled, refer to the Microsoft
Dynamics GP Integration Guide that is included with Microsoft Dexterity.
You can also create report templates that can be used with modified
versions of reports. Refer to Chapter 38, Report Templates for Modified
Reports, for details about how to do this.

Creating a new report template document


To create a new report template document, complete the following
procedure:
1. Open Report Template Maintenance.
In Microsoft Dynamics GP, choose Template Maintenance from the
Reports menu.

USERS

GUIDE

213

PA RT

WO R D

TE M P L AT E S

2. Select the original version of the report.


Choose More Reports in the Report Name drop-down list. In the
Reports lookup window, select the original report.

Click Select.
3. Create a new report template document.
In the Report Template Maintenance window, click New to create a
new report template document for the report.
4. Specify the details of the new report template document.
In the New Template window, specify how the new report template
document will be created.

214

U S E R S

G U I D E

For reports that have no existing report template documents, the


new report template will be blank (no layout).

For reports that have existing report template documents, the new
template can be created based on the template you select. In most
cases, you will choose to create the template based on an existing
template, because then you dont have to re-create the report
template layout.

C H A P T E R

3 7

C R E AT IN G

R E P O R T

T EM PL AT E S

You must also supply a name for the report template you are creating.
The name should indicate how the report template is intended to be
used.

Click Create.
5. Modify the new report template.
In the Report Template Maintenance window, select the new report
template you created, and then click Modify. The report template will
be opened in Microsoft Word.
Using the techniques and guidelines described in Chapter 36, Report
Template Design, add to or modify the report template document as
needed.
6. Save the new report template.
In Microsoft Word, save the new report template document to a
convenient location where you can easily find it.
7. Close the new report template.
In Microsoft Word, close the new report template document.

USERS

GUIDE

215

PA RT

WO R D

TE M P L AT E S

8. Import the new report template document.


In the Report Template Maintenance window in Microsoft Dynamics
GP, select the new template. Click Add Template (the green plus). A
file dialog box will appear. Select the report template document you
just saved, and then click Open.
9. Replace the existing report template document.
A message will be displayed that indicates you are replacing an existing
template. Click Yes to replace the existing report template document
with the one you just selected.
The new report template is ready to be assigned and used in Microsoft
Dynamics GP.

216

U S E R S

G U I D E

Chapter 38:

Report Templates for Modified


Reports
If you make a modified version of a report that has a Microsoft Word report
template defined for it, you need to make a modified version of the report
template document to have your changes appear in the generated Microsoft
Word document. When the modified report is run in Microsoft Dynamics
GP, the modified report template document is used so that your
modifications are included in the generated Microsoft Word document. The
following topics are discussed:

Modifying the report definition


Creating a modified report template document
Using the modified report template document
Updating the data source for a report template

Modifying the report definition


The report definition for the modified report will be the basis for your
report template document. If you are adding any additional content to the
modified report, such as report fields, calculated fields, static text, or
legends, you should make all of the necessary changes before you work on
the report template document.
Be sure that your modified report is working correctly when it is run as a
standard report from Microsoft Dynamics GP. If the modified report does
not display correctly as a standard report, it will not display correctly as a
generated Microsoft Word document.
The following example demonstrates the end-to-end process for making a
report template for a modified report. Assume the SOP Blank Quote Form
report is being modified to include the e-mail address of the person for
whom the quote is being generated. A calculated field can be defined for
the modified report that will retrieve the e-mail address for the quote
recipient. This calculated field has the following calculated expression:
FUNCTION_SCRIPT(RW_GetInternetInfo "CUS"
RM_Customer_MSTR_ADDR.Customer Number
RM_Customer_MSTR_ADDR.Address Code 1 )

USERS

GUIDE

217

PA RT

WO R D

TE M P L AT E S

This calculated field with the e-mail address is added to the report layout,
as shown in the following illustration.

This EMailAddress calculated field was added to both the Report Header
and Page Header sections of the report layout.

Creating a modified report template document


After the modified report definition has been created, you can make a
report template document for it. Do this using the following procedure:
1. Open Report Template Maintenance.
In Microsoft Dynamics GP, choose Template Maintenance from the
Reports menu.
2. Select the modified version of the report.
Choose More Reports in the Report Name drop-down list. In the
Reports lookup window, select the modified report.

Click Select.

218

U S E R S

G U I D E

C H A P T E R

3 8

R E P O R T

T EM PL AT E S

FO R

M O DI FIE D

R E P O R T S

3. Create a new report template document.


In the Report Template Maintenance window, click New to create a new
report template document for the modified report.
4. Specify the details of the new report template document.
In the New Template window, specify how the new report template
document will be created. The new report template can be blank (no
layout) or it can be created with layout of an existing template. In most
cases, you will choose to create the template based on the original
report template.
You must also supply a name for the report template you are creating.
The name should indicate that the template is for a modified version of
the report.

Click Create.
5. Modify the new report template.
In the Report Template Maintenance window, select the new report
template for the modified report, and then click Modify. The report
template document will be opened in Microsoft Word.
6. Display the field list for the report.
In Microsoft Word, select the Developer tab. In the Microsoft Dynamics
GP Templates group, click Field List.

USERS

GUIDE

219

PA RT

WO R D

TE M P L AT E S

7. View the additional resources for the report.


At the top of the Field List, select the XML resource that contains the
report definition data. When you select the individual sections of the
report, you should see the fields, captions, and legends that you added
to the layout for the modified report.
Continuing the example from the previous section, the EMailAddress
calculated field can be seen in the Fields list for the ReportHeader and
PageHeader sections. These were the sections it was added to in the
layout for the modified report.

This calculated field was


added to the layout of the
modified report.

8. Make modifications to the report template layout.


Following the techniques and guidelines described in Chapter 36,
Report Template Design, make the necessary changes to the report
template document. For instance, you will want to add the additional
fields and captions you created for the modified report.
Continuing the example for the modified Sales Blank Quote Document
report, the EMailAddress field was added to the report template
document. Following the guidelines, the value was dragged from the
ReportHeader section in the Custom XML Mapping pane.

220

U S E R S

G U I D E

C H A P T E R

3 8

R E P O R T

T EM PL AT E S

FO R

M O DI FIE D

R E P O R T S

9. Save the modified report template.


In Microsoft Word, save the modified report template document to a
convenient location where you can easily find it.
10. Close the modified report template.
In Microsoft Word, close the modified report template document.
11. Import the modified report template document.
In the Report Template Maintenance window in Microsoft Dynamics
GP, select the modified template. Click Add Template (the green plus).
A file dialog box will appear. Select the report template document you
just saved for the modified report, and then click Open.
12. Replace the existing report template document.
A message will be displayed that indicates you are replacing an existing
template. Click Yes to replace the existing report template document
with the one you just made modifications to.

Using the modified report template document


To use the modified report template document, you must assign it to be
used with the modified report. To do this, complete the following
procedure:
1. Open Report Template Maintenance.
In Microsoft Dynamics GP, choose Template Maintenance from the
Reports menu.
2. Select the modified version of the report.
Choose More Reports in the Report Name drop-down list. In the
Reports lookup window, select the modified report. Click Select.

USERS

GUIDE

221

PA RT

WO R D

TE M P L AT E S

3. Assign the modified report template.


In the Report Template Maintenance window, select the modified
report, and then click Assign. Use the Company Assignment window
to assign the modified report template to a company.
Security in Microsoft Dynamics GP must be configured to that the modified
version of the report is used. Refer to Accessing modified reports on page 178
for details about how to do this. When the report is run, the Report Type
drop-down list in the Report Destination window will have the Template
choice available. If you choose Template, the modified report template for
the modified version of the report will be used to generate the output in
Microsoft Word format.
Continuing the example from the previous sections, the modified report
template for the SOP Blank Quote Form was assigned to the Fabrikam
sample company. When the modified SOP Blank Quote Form report is run,
and Template is chosen as the report type, the modified report template is
used to generate the output as a Microsoft Word document. In this example,
the output contains the e-mail address that was added to the modified
report.

When the modified report is run,


the modified report template is
used. It contains the e-mail
address that was added.

222

U S E R S

G U I D E

C H A P T E R

3 8

R E P O R T

T EM PL AT E S

FO R

M O DI FIE D

R E P O R T S

Updating the data source for a report template


When you have created a modified report and its corresponding report
template document, the report definition data embedded into the report
template document matches the layout of the modified report. If you make
additional changes to the modified report, such as adding additional fields
to layout, the report definition data embedded into the report template
wont have those changes.
Rather than having to re-create the report template document, you can
replace the embedded report definition data with an updated version. To
do this, complete the following procedure.
1. Update the modified report.
Make the additional changes to the modified report. Be sure the report
is working correctly.
2. Export the XML representation of the report.
In Microsoft Dynamics GP, run the modified report. In the Report
Destination window, set the Report Type to Standard. Mark the File
check box, specify XML Data file as the export format, supply a
filename for the export file, and then click OK.

Export the report in XML


Data format.

The XML data file for the report has two main sections. The first section
contains the report definition information, while the second section has
actual data for the report. The updated report definition section is what
must be embedded into the report template document.

USERS

GUIDE

223

PA RT

WO R D

TE M P L AT E S

3. Open the report template document.


In Microsoft Word, open the report template document for which you
want to replace the report definition information.
4. Select the XML resource containing the report definition.
Display the Developer tab, and then click Field List in the Microsoft
Dynamics GP Templates group. The Custom XML Mapping pane will
be displayed. In the XML Resource drop-down list, select the XML
resource for the report.
5. Remove the XML resource.
In the Microsoft Dynamics GP Templates group, click Remove Source.
A message will be displayed warning of possible missing data. Click
OK to remove the source.
6. Add the updated report definition.
In the Microsoft Dynamics GP Templates group, click Add Source. In
the file dialog displayed, locate the XML data file you exported for the
revised modified report. Select the file and click Open.
7. Select the updated XML resource.
In the Custom XML Mapping pane, use the XML Resource drop-down
list to select the updated XML resource for the report. The Report
Section and Fields lists should contain items that match the revised
report definition.
8. Make the changes to the report template.
Using the techniques and guidelines described in Chapter 36, Report
Template Design, make the necessary changes to the report template
document to match the changes you made to the modified report.

224

U S E R S

G U I D E

Chapter 39:

Troubleshooting Templates
Use the following information to help you troubleshoot issues you may
encounter when working with report template documents. The following
items are discussed:

Template layout issues


Template processing issues

Template layout issues


The following layout issues can occur for report template documents.

Incorrect data in Word document


If the generated Microsoft Word document for a report does not contain the
correct data, or data is missing from the document, check the following:

Verify that the standard version of the report is working correctly. If the
standard version of the report isnt displaying data correctly, the
template version will not either. This problem is more likely to occur if
you have made a modified version of a report.

Be sure the bookmarks for the report template document are defined
with the correct names.

Verify that the bookmarks are not located inside of a field you added to
the report template document. If they are, the template processing
engine wont be able to find the bookmarks.

Field values are empty


If a field value is empty in the generated Microsoft Word document, check
the following:

Verify the item was dragged to the report template document from the
appropriate report section of the XML data. If the item comes from the
wrong section, it will not contain any data.

Be sure that you have all of the tables needed for the report template
document. Data values may not appear in a report if the report is
missing one of the standard tables, such as the Report Header table.

USERS

GUIDE

225

PA RT

WO R D

TE M P L AT E S

Column headers do not repeat


This issue can occur for report template documents that use the column
pattern. Column headers for tables that repeat at the beginning of each page
are a feature of Microsoft Word. You must set the table property that
indicates the first row of the table is to be repeated.

Items missing from Custom XML


If items are missing from the Custom XML for a report template document,
this typically means that the report definition was changed after the report
template document had been generated. You can import the updated report
definition using the procedure described in Updating the data source for a
report template on page 223.

Company image does not display


If the company image for a report does not display in the generated
Microsoft Word document, check the following:

Be sure that an image has been assigned for the company. You may also
want to run another report for the company to verify that the image is
displayed.

Be sure that the Picture Content Control has been properly defined. If
the properties for that control are not set to the proper values, the
template processing engine will not be able to find the control.

Template processing issues


The following issues can occur when report template documents are
processed to generate output in Microsoft Word format.

Template choice is not available


If the Template choice is not available in the Report Destination window,
check the following:

226

U S E R S

G U I D E

Be sure that a report template has been assigned to the report.

Be sure that the Open XML SDK has been installed.

If a modified version of the report is being used, a report template


document may not have been created and assigned.

C H A PT E R

3 9

T R O U B L E S HO O T I N G

T EM PL AT E S

Incorrect template document is used


If an incorrect report template document is used, verify the assignment of
the template document.

Template processing does not complete


If you run a report, choose to generate the output in Microsoft Word format,
but the processing never completes, try the following:

The Template Processing Engine may have encountered an error and be


in an unknown condition. Restart Microsoft Dynamics GP so the
Template Processing Engine is re-initialized.

If a specific report is causing problems, try simplifying the report


template document to isolate the problem. For example, if a modified
report will not generate the output in Microsoft Word format, try
running the original version of the report. If the original report can
generate the output in Microsoft Word format, the issue can be isolated
to changes you made in the modified report template document.

USERS

GUIDE

227

228

U S E R S

G U I D E

APPENDIX

Appendix
This manual has the following appendix:

230

U S E R S

G U I D E

Appendix A, User-defined Functions, lists common user-defined


functions available for use in calculated fields.

Appendix A:

User-defined Functions
This appendix describes the common user-defined functions that are
available for use in calculated fields. The following functions are described:

RW_Address
RW_CityStateZip
RW_GetAccountNumber

A document with descriptions of the user-defined functions available for the Report
Writer is found in the Microsoft Dynamics GP SDK in the Procedures and
functions category. You can find the document by searching for Report Writer.

RW_Address
Most addresses in Microsoft Dynamics GP allow up to three address lines.
In some cases, you may want to suppress the address lines that are empty,
and have the remaining lines of the address move up to occupy the unused
space. In earlier versions of the Report Writer, you needed several
calculated fields to accomplish this. The RW_Address user-defined function
provides this functionality with only four calculated fields, one for each line
of the address. The function takes the following parameters:
in
in
in
in
in
in
in

integer Line_Number
string Line1
string Line2
string Line3
string City
string State
string PostalCode

The Line_Number parameter indicates which line of the address the


calculated field will be producing. The value ranges from 1 to 4. The
remaining lines are string values that are used to pass address information
into the function.
For example, the address information in the RM_Customer_MSTR table
consists of the Address 1, Address 2, Address 3, City, State, and Zip fields.
The following calculated field displays the first line of the address. Notice
that the first parameter passed to the RW_Address function is the integer
value 1, indicating this is the first line of the address. The remaining
parameters pass in address information from the RM_Customer_MSTR
table.
FUNCTION_SCRIPT(RW_Address 1 RM_Customer_MSTR.Address 1
RM_Customer_MSTR.Address 2 RM_Customer_MSTR.Address 3
RM_Customer_MSTR.City RM_Customer_MSTR.State RM_Customer_MSTR.Zip )

USERS

GUIDE

231

A P P E N D I X

U S E R - D EF I N E D

F U N C TI O N S

The following calculated field is used to display the second line of the
address. Notice that the first parameter is the integer value 2, indicating this
is the second line of the address. All of the other parameters remain the
same.
FUNCTION_SCRIPT(RW_Address 2 RM_Customer_MSTR.Address 1
RM_Customer_MSTR.Address 2 RM_Customer_MSTR.Address 3
RM_Customer_MSTR.City RM_Customer_MSTR.State RM_Customer_MSTR.Zip )

The third and fourth calculated fields are similar. The only difference is the
first parameter is either the integer value 3 or 4, indicating the third or
fourth line of the address. When all of the calculated fields are complete,
add them to the report layout in place of the standard address fields.

Use the calculated fields


in place of the standard
address fields.

RW_CityStateZip
The RW_CityStateZip user-defined function strips the space from between
the City, State, and Zip Code fields of an address. It takes the following
parameters:
in string City
in string State
in string ZipCode

The following calculated field uses the function to remove the extra spaces
from the City, State, and Zip fields retrieved from the RM_Customer_MSTR
table:
FUNCTION_SCRIPT(RW_CityStateZip RM_Customer_MSTR.City
RM_Customer_MSTR.State RM_Customer_MSTR.Zip )

232

U S E R S

G U I D E

A P P E N D I X

U S ER - D E F I N E D

F U N C TI O N S

RW_GetAccountNumber
The RW_GetAccountNumber user-defined function retrieves an account
number based on the account index. This allows you to retrieve an account
number without having to link the Account Master table to your report.
The function takes the following parameter:
in string AccountIndex

The following example shows an account number being retrieved, based on


the Account Index field from the Year-To-Date Transaction Open table.
FUNCTION_SCRIPT(RW_AccountNumber GL_YTD_TRX_OPEN.Account Index )

USERS

GUIDE

233

234

U S E R S

G U I D E

Glossary
Additional headers and footers
Report sections that are printed when a
specified field changes. Additional
headers and footers are created using the
Report Options and Header/Footer
Options windows.

Alphanumeric
A combination of numbers and letters.

Array field
A field containing multiple occurrences
of the same type of information. The
individual pieces of information stored
by an array field are called elements. For
example, a seven-element array field
could be used to store daily sales totals
instead of seven individual fields.

Array index
The number designating a specific
element within an array field. Each
component field within an array field has
an array index.

Boolean expression
An expression that results in a value of
true or false.

Break on field
A field on a report, that when the value
changes, causes an additional header or
additional footer to be printed.

Calculated field
A field containing an expression that
combines fields in a reports table, report
fields,
constants,
functions,
and
operators. The result of the calculation is
displayed in the field if the field is placed
on the report. Calculated fields are
created in the Calculated Field Definition
window.

Check box
A control type used to define data types
that allow users to mark or unmark an
option. Check boxes have boolean
storage types.

Combo box
A control type used to define data types
that allow users to enter a text value or
choose that value from a list. The items in
the list are determined by the static text
values in the data type definition.

Component
One field of a composite field.

Composite
A group of fields and their associated
data types that form a single data type.
Composite data types are defined by the
composite control type and the fields that
make up the composite.

Concatenate
To connect two strings to form a single
string.

Conditional expression
A boolean expression used to print the
corresponding true or false case in a
calculated field. Conditional expressions
are written in the Calculated Field
Definition window.

Control type
The main characteristic of a data type,
controlling the type of information that
can be stored in fields that use that data
type, and some aspects of how the
information will be displayed.

Custom report
A new report that you make. You can
start with a blank report, or you can start
by making a copy of a report that already
exists.

Defaults file
A file that stores information specific to
the current workstation. This file is
named DEX.INI for Windows.

Definition window
A window that allows you to create a
resource and specify its functional
characteristics.

DEX.INI file
A file that stores information specific to
the current workstation. Also referred to
as the defaults file.

Dictionary
A group of resources that, when
interpreted by the runtime engine,
present
a
complete
functioning
application. See also Reports dictionary.

Drop-down list
A control type used to define data types
that allow users to select one item from a
list. The integer value corresponding to
the position of the item chosen, not the
items static text value, is stored when the
users selection is saved.

Expression
A sequence of operands and operators
that are evaluated to return a value.

Field
A field contains a single piece of
information used by the application
dictionary.

Footer
A report section that is printed at the
bottom of a report, page, or group.
Reports can include report footers, page
footers and additional footers.

Format
The extra characters, spacing, and
attributes that can be applied to a data
type when data is displayed.

Format field
An integer field that specifies the format
to use for a string or currency field.

Format string
A data mask used for string and
composite formats. The format string
allows extra characters to appear in a
field without affecting the way data in
the field is stored.

USERS

GUIDE

235

GLOS SA RY

Global variable

MAPI

A variable available to any report or


calculated field in the application at any
time.

Graphics report
A report on which graphics, colors (if the
printer has color capabilities), patterns,
and fonts other than the default font can
be printed.

Header
A report section that is printed at the top
of a report, page, or group. Reports can
include report headers, page headers,
and additional headers.

HTML
HyperText Markup Language. Reports
created with the Report Writer can be
exported to HTML files.

Key

Modified reports
A copy of an original report that you
have made changes to. Modified reports
are stored in the Reports dictionary. A
modified report can be substituted for an
original report in the accounting system.

Multi-select list box


A control type used to define fields from
which one or more static text values can
be selected.

Numeric expression
An expression that results in a numeric
value.

One-to-many

A field or combination of fields within a


record that is used as a basis by which to
store, retrieve, and sort records.

Key segment
One field of a group of fields that
compose a key.

Keyable length
The number of characters that can be
displayed by a field.

Launch file
A file that is used to start an application
with the runtime engine. This file stores
the location of the dictionaries that will
be used, including the application
dictionary and the reports dictionary.

Layout window
A window that allows you to design the
layout of a report.

List box
A control type used to define data types
that allow users to select one static text
value from a list.

236

An acronym for Mail Application


Program Interface. If you have a MAPIcompliant mail system, you can mail
reports to other users.

U S E R S

G U I D E

A type of relationship between two


tables. For every record in the first table,
there are many records in the second
table that are related to it. For example,
an invoice header table contains a list of
invoices, while an invoice line item table
contains a list of the items on each
invoice. For one invoice in the first table,
there are many line items in the second
table, so theres a one-to-many
relationship between the tables. The
relationship between two tables is
viewed or defined in the Table
Relationship Definition window.

One-to-one
A type of relationship between two
tables. For every record in the first table,
there is only one corresponding record
that is related to it in the second table.
The relation between two tables is
viewed or defined in the Table
Relationship Definition window.

Operand
An item in an expression that is acted on
by an operator.

Operator
A symbol that indicates the action to
perform on the operands in an
expression.

Order of precedence
The order in which the operations are
carried out for an expression. The
traditional order of precedence for
numeric expressions is: first unary
minus, then exponentiation, followed by
multiplication, division, and modulus,
then addition and subtraction, and finally
shift, equality, and logical operations.
This is also referred to as the order of
evaluation.

Original report
A report that was provided with the
accounting system. You can make
modified versions of original reports.

Overflow
The condition that occurs in a numeric
expression when an intermediate or final
result of the expression is too large to be
stored by the type of data used in the
expression.

Package files
Special text files that are used to deliver
customizations made with the Modifier,
VBA, and the Report Writer.

Picture library
A feature in the Report Writer that allows
you to store graphics in a generic format
that can be used on any supported
platforms.

Pixel
The smallest graphical element displayed
on a monitor. The pixel is the smallest
unit of measurement in layout windows.
You can move objects one pixel at a time
within a layout window by using the
arrow keys on the keyboard.

Point size
The vertical size of a font. There are 72
points to an inch.

G L O S S A R Y

Precedence
The order in which operations are
performed for a type of expression. See
also Order of precedence.

Radio button
A control type used to define data types
that allow a single selection to be made
from a group of two or more selections.
Radio buttons must be used with a radio
group.

Radio group
A control type thats used to group
related radio buttons and store the value
of the selected button. A radio groups
value is stored as an integer
corresponding to the selected radio
buttons position in the tab sequence,
beginning with 0. For instance, if the
second radio button in the tab sequence
is selected, the radio groups value is 1.

Record
A collection of data made up of one
instance of each field in a table.

Relationship
See Table relationship.

Report field
In the Calculated Field Definition
window, a report field is a field with a
modified display type. Report fields can
be used in conditional and calculated
expressions in calculated fields.

Report template document


A Microsoft Word document that defines
the layout and formatting for a report
that can generated in Microsoft Word
format.

Reports dictionary
The dictionary that stores modified
reports from the main dictionary and
new reports created with the Report
Writer. The reports dictionary is created
when the Report Writer is accessed for
the first time. All reports you modify or
create with the Report Writer are stored
in the reports dictionary.

Reports Library
A special web site that contains reports
have already had common modifications
made to them.

Resource
An object such as a field, string, native
picture, table, window, or script that can
be used to create applications in
Dexterity.

Resource definition window


See Definition window.

Resource descriptions tool


A tool that displays information about
the current dictionarys fields, windows,
and tables.

Resource list window


A window in the Report Writer that
allows you to view all the resources of a
particular type, such as fields.

Runtime engine
An application thats used to interpret a
dictionary. When a user starts an
application, the runtime engine uses the
resources in the dictionary to present a
functioning application.

Series
A predefined category to which report
and table resources are assigned. Series
allow categorization of resources.

Static text value


Text thats displayed as part of a data
type, such as the items in a list box.

Storage type
One of the standard forms used to store
the data in a field. The storage types are:
boolean, integer, long, currency, variable
currency, string, text, date, and time. The
control type determines which storage
type is used to store the data in the field.

String
A sequence of up to 255 ASCII characters.
See also String resources.

String resources
Sequences of up to 79 characters used
throughout an application dictionary for
window names, field prompts, static text
values, and report text.

Table
A collection of related data formatted in
rows. Each row represents a separate
record, and each column represents a
separate field.

Table relationship
A link between tables that have fields in
common. These relationships allow the
Report Writer to select fields from all of
the related tables and use them on a
single report. Table relationships are set
up using the Table Relationship
Definition window.

Template-enabled report
A report that can have Microsoft Word
report template documents associated
with it, and generate the report output in
Microsoft Word format.

Text report
A report that can display only characters
in a native printer font.

Toolbox
A window that opens in conjunction with
the Report Layout window. It contains
tools used to place and arrange items in
the layout area.

Virtual table
A special type of table that allows data
stored in separate tables to be read as if it
had been stored in a single table.

Visual
(VBA)

Basic

for

Applications

A development system created by


Microsoft that can be embedded into
applications. VBA is embedded into the
Report Writer, providing additional
customization capabilities.

String expression
An expression that results in a string
value.

USERS

GUIDE

237

GLOS SA RY

WYSIWYG
An acronym meaning what you see is
what you get. This applies to intuitive
design tools used to create reports in the
Report Writer.

238

U S E R S

G U I D E

Index

align to bottom tool, using in report


layout 32
align to left tool, using in report layout
32
A
About, menu item 13
align to right tool, using in report
Accessing Reports, chapter 177-182
layout 32
account numbers, retrieving for reports align to top tool, using in report layout
233
32
add-in, for editing report templates 197 aligning, fields in reports 32
adding fields
Alignment
to a report layout 30
drawn object property 37
to a report template document 205
field property 36
addition operator, use in calculated
alignment, for preprinted reports 159
fields 59
alphanumeric, defined 235
additional footers
alternate reports
beginning a new report after 74
described 181
creating 73-75
modifying 181
defined 235
Alternate/Modified Forms and
described 71
Reports window 110, 178
illustration 72
arrange tools, described 32
in report template documents 204 arranging items, in report layout 32-33
position in report layout 72
array fields
printing after given number of
adding to a report layout 33
records in body 73
defined 235
relationship with additional
array indexes
headers 71
defined 235
selecting field based upon 74
setting for report fields 33
starting a new page after 74
ArrayIndex, field property 36
suppressing 74, 75
arrow tool, using in report layout 30
use in reports 29
AVERAGE, report restriction function
additional headers
49
creating 73-75
Average, report display type 83
defined 235
B
described 71
BackColor
illustration 72
drawn object property 37
in report template documents 204
field property 36
position in report layout 72
Basics, part 6-16
relationship with additional
Body table
footers 71
example 204
selecting field based upon 74
in report template document 202
suppressing 74
layout of 204
use in reports 29
bookmarks
Additional Headers and Footers,
list of 207
chapter 71-75
used for report template
addresses, suppressing empty lines 231
documents 207
ADMIN_SYSTEM_008 task 177
boolean, use in reports 38
Adobe Acrobat documents, see PDF

boolean expressions, defined 235


break on field, defined 235

C
Calculated Field Definition window 57
calculated fields
adding fields to the expression 61
calculated expressions 57
chapter 57-70
concatenating in 60
conditional expressions 57
creating, procedure 58-59
defined 235
described 57
nesting system-defined functions
64
operators used in 59-61
result type restrictions 57
using constants in 63
using global variables in 62
using legends in 61
using other calculated fields in 61
using report fields in 61
using system-defined functions in
63
using user-defined functions 63, 69
Cancel button, how used in Report
Writer 15
captions, adding to report template
documents 205
CAT operator, use in calculated fields
60
characters per inch, for report text 40
charts
composite format options 125
currency format options 124
drawn object properties 37
field properties 36
formats for currency fields 81
numeric format options 124
report sections 28
report template item placement
206
standard buttons in the Report
Writer 15
static text values 120
string format options 125

USERS

GUIDE

239

I N D E X

check boxes
defined 235
use in reports 38
checks
modifying 168
overview 167
printing 167
types of 167
Checks, Invoices and Labels, chapter
167-170
circle tool, using in report layout 31
Clear, menu item 12
Clustered, key option 137
clustered keys 137
colorizing report sections 28
colors
custom colors for reports 41
for report items 41
column pattern, for report document
templates 211
columns, adding to mailing labels 170
combo boxes
defined 235
use in reports 38
comma-delimited files, saving reports
to 149
Common Modifications, chapter
113-116
company image
in Word Template reports 208
not displaying in Word output 226
components, defined 235
composite formats
example 126
format options 125
composites
defined 235
formatting 126
concatenating
defined 235
in reports 60
conditional expression, defined 235
configurations, for Report Writer 175
constants, using in calculated fields 63
Contents, menu item 13
Control Count
described 164

240

U S E R S

G U I D E

Control Count (continued)


report display type 83
control types
defined 235
static values for 120, 121
conventions, in documentation 3
Copy, menu item 12
core resources, described 173
Count, report display type 83
counting
group items 164
groups 164
Create Index, key option 137
Creating Report Templates, chapter
213-216
Creating Reports, part 18-85
creep, described 158
CUR_STR, calculated field function 64
currency formats
format options 124
using format fields 81
currency values, suppressing decimals
22
current report, modifying 106
custom colors, for report items 41
custom reports
accessing 179
defined 235
described 8
printing 142
Custom XML Mapping pane
displaying in Microsoft Word 205
items missing 226
selecting XML resource 205
Customization Maintenance window
184
customizations, see modified reports
Cut, menu item 12

D
Data, report display type 83
data source in report template
document, updating 223
Data Storage, chapter 89-94
data storage, terminology 89
Data Type Definition window 119

data types
chapter 119-121
characteristics 119
described 119
format 121
keyable length 120
opening 119
opening from global fields 128
static values 120
database types, for tables 135
date tool, using in report layout 31
dates, use in reports 38
DAY calculated field function 64
DAY_NAME, calculated field function
64
defaults file, defined 235
definition windows
defined 235
described 14
Delete button, how used in Report
Writer 16
deleting modified reports 182
Descending, key segment option 137
designing reports 153
DEX.INI
defined 235
ExportOneLineBody 150
dictionaries, defined 235
display names
described 92
for tables 135
display types
for reports 82
use in report sections 85
DisplayName, report property 35
DisplayType, field property 36
distributing reports 183
divider tool, using in report layout 31
division operator, use in calculated
fields 59
documentation, symbols and
conventions 3
DOW, calculated field function 65
Drawing Options window 40
drawn objects, properties, list 37
drop-down lists
defined 235

I N D E X

drop-down lists (continued)


use in reports 38
duplicate records, associated key
option 137
Duplicates, key option 137

E
Edit Launch File window 174
Edit menu, described 12
elements of arrays, specifying 33
EndTemplateDocumentFooterBookma
rk, described 207
equality operator, use in calculated
fields 60
EXISTS, report restriction function 50
Exit, menu item 12
Exporting Data, chapter 149-150
exporting data with reports 149
exporting package files 184
ExportOneLineBody, DEX.INI setting
150
expressions, defined 235

F
Field, field property 36
Field Definition window 127
Field Descriptions, menu item 12
field properties, list 36
FieldID, field property 36
fields
adding to report template
documents 205
adding to reports 30, 33, 114
adding to the calculated field
expression 61
chapter 127-128
characteristics on reports 38
defined 235
described 89, 127
formatting 80
hiding on report layout 79
in graphics reports, applying
drawing options 40
object properties 36
opening 127
opening data type 128
properties, list 36

fields (continued)
removing from report template
documents 206
removing from reports 115
FieldType, field property 36
files, sending reports to 149
FIRST, report restriction function 50
First Item In Group, report display
type 83
First Occurrence Only, report display
type 84
Font
drawn object property 37
field property 36
FontBold
drawn object property 37
field property 36
FontColor
drawn object property 37
field property 36
FontItalic
drawn object property 37
field property 36
fonts
design issues 154
for graphics reports 40
for text reports 41
generic fonts for reports 40
specifying color for reports 40
specifying size for reports 40
substituting in reports 40
FontSize
drawn object property 37
field property 36
FontUnderline
drawn object property 37
field property 36
Footer Options window 73
footers
see also additional footers
defined 235
for groups 163
FORALL, report restriction function 52
form pattern, for report document
templates 210
Format, field property 36
Format Definition window 123

format fields
defined 235
described 81
example 82
use 82
format strings
composite formats 126
defined 235
described 125
example 125, 126
string formats 125
using to add static elements 125
FormatField, field property 36
FormatFieldSrc, field property 36
formats
aligning field information 124
applying to report fields 80, 81
chapter 123-126
composite formats 125, 126
currency, format options 124
defined 235
described 123
format strings 125
naming 123
numeric, format options 124
opening 123
options 124
string formats 125
FREQUENCY, report restriction
function 52
functions, see restriction functions,
system-defined functions,
user-defined functions

G
Gathering Data, part 88-102
Generate Resource Reports, menu item
11
generic fonts, for reports 40
Getting Started with the Report Writer,
chapter 7-9
global fields
chapter 127-128
opening 127
opening data type 128
Global Modifications, part 118-138

USERS

GUIDE

241

I N D E X

global variables
defined 236
using in calculated fields 62
graphics
design issues 154
in Word Template reports 208
graphics reports
aligning text items 41
applying drawing options 40
defined 236
tools specific to, described 30
greater than operator, use in calculated
fields 60
greater than or equal to operator, use in
calculated fields 60
groups
advanced groups 166
chapter 161-166
counting 164
counting items in 164
creating in reports using headers
and footers 71
described 71, 161
footers 163
headers 162
sorting information for 162

H
Header Options window 73
headers
see also additional headers
defined 236
for groups 162
Help menu, described 13
history tables, described 93
horizontal alignment, for preprinted
reports 159
HTML
defined 236
saving reports to 149

I
Ignore Case, key segment option 138
images, in Word Template reports 208
Import Package File window 185
Import Reports window 188
importing
package files 185

242

U S E R S

G U I D E

importing (continued)
reports from other dictionaries 187
validating results 188
Importing Reports, chapter 187-189
indexes, for tables 137
inequality operator, use in calculated
fields 60
Insert button, how used in Report
Writer 16
INT_STR, calculated field function 65
invoices
overview 169
printing 169

K
key segments
defined 236
described 136
options 137
keyable length
defined 236
described 120
keys
creating indexes for 137
defined 236
described 91, 136
example 136
key segments, described 136
multisegment keys, described 136
options 137

L
labels
adding columns 170
overview 169
printing 169
landscape pages, for reports 22
LAST, report restriction function 52
Last Occurrence, report display type 84
launch files
defined 236
described 174
layout
design issues 154
for preprinted forms 158
issues for report template
documents 225
modifying for reports 113

Layout menu, Colorize Report Sections


28
layout windows
defined 236
described 15
for reports 27
legends
adding to report template
documents 205
chapter 77-78
example 78
setting with VBA 77
using in calculated fields 61
less than operator, use in calculated
fields 60
less than or equal to operator, use in
calculated fields 60
LFT_STR, calculated field function 65
light bulb symbol 3
line tool, using in report layout 31
LineColor, drawn object property 37
LineSize, drawn object property 37
list boxes
defined 236
use in reports 38
LNG_STR, calculated field function 65
logical AND operator, use in calculated
fields 60
logical NOT operator, use in calculated
fields 61
logical OR operator, use in calculated
fields 60
logos
guidelines 131
in report template documents 208
sample 131
Lookup, menu item 13
lookup buttons, described 16

M
Macro menu, described 12
mailing labels 169
mailing reports
chapter 147-148
procedure 148
MainTable, report property 35
MainTableKey, report property 35

I N D E X

MainTableName, report property 35


MAPI
defined 236
mailing reports 147
using with reports 147
margin notes 3
master tables, described 93
matching patterns in report restrictions
55
MAXIMUM, report restriction function
54
Maximum, report display type 84
maximum records for a report 21
MaxRecords, report property 35
menus in Report Writer
Edit menu 12
File menu 11
Help menu 13
Macro menu 12
Resources menu 12
Windows menu 13
metafiles, as pictures 129
Microsoft Dynamics GP Add-in for
Microsoft Word
accessing 197
described 197
installing 197
Microsoft Dynamics GP Report Writer,
see Report Writer
Microsoft Word
add-in for editing report templates
197
advanced options 199
bookmarks used 207
Design Mode 209
Developer tab 197
display options 199
settings for editing report template
documents 199
setup for editing report templates
197
MINIMUM, report restriction function
54
Minimum, report display type 84
modified reports
accessing 178
creating 106

modified reports (continued)


defined 236
described 8
distributing 183
from Reports Library 116
printing 141
removing 182
report template documents for 218
setting security access 110
storing 8
third-party reports 180
viewing 109, 178
Word Templates for 217
Modifying Fields, chapter 79-85
Modifying Reports, part 104-116
MONTH, calculated field function 65
MONTH_NAME, calculated field
function 65
mouse symbol 3
multiplication operator, use in
calculated fields 59
multisegment keys 136
multi-select list box
defined 236
use in reports 38

one-to-one relationship (continued)


described 95
Open button, how used in Report
Writer 15
open tables, described 93
operands, defined 236
operators
defined 236
parentheses, use in calculated
fields 59
used in calculated fields 59-61
optimizing reports 155
options, for reports 22
order of precedence, defined 236
Orientation, report property 35
orientation, for report pages 22
original reports
defined 236
described 8
overflow, defined 236
Overview of Word Templates, chapter
193-196
overwriting customizations with
package files 186

package files
contents 183
defined 236
described 183
exporting 184
import/export issues 186
importing 185
overwriting customizations 186
Packaging Reports, chapter 183-186
page creep, described 158
Page Footer table
in report template document 202
layout of 203
page footers, use in reports 29
Page Header table
example 203
in report template document 202
layout of 203
page headers, use in reports 29
page number tool, using in report
layout 31

Name, report property 35


names
finding for reports 105
formats 123
tables 135
New button, how used in Report
Writer 15
New Template window 215, 219
numeric expressions, defined 236
numeric formats, format options 124

O
object properties, for fields 36
offsets, for preprinted reports 159
OK button, how used in Report Writer
15
one-to-many relationship
defined 236
described 95
one-to-one relationship
defined 236

USERS

GUIDE

243

I N D E X

page orientation 22, changing for


reports 114
page size, for preprinted forms 158
parentheses, use in calculated fields 59
Paste, menu item 12
Pattern
drawn object property 37
field property 36
PatternColor
drawn object property 37
field property 36
patterns, for layout of report template
documents 210
PDF
mailing reports as 147
saving reports to 149
physical names
described 92
for tables 135
Picture Definition window 129
picture library
adding pictures to 31, 129
defined 236
using pictures from 130
picture tool, using in report layout 31
pictures (resource)
adding to picture library 31, 129
adding to reports 31, 130
chapter 129-132
described 129
logos on reports 131
pixel, defined 236
point size, defined 236
portable documents, see PDF
portrait pages, for reports 22
positioning, fields in reports 30
Position-Left
drawn object property 37
field property 36
Position-Top
drawn object property 37
field property 37
POWER_10, calculated field function
65
precedence, defined 237
preprinted forms
chapter 157-160

244

U S E R S

G U I D E

preprinted forms (continued)


creep 158
described 157
for reports 24
page size 158
printing 159
report definition 157
report layout 158
Previous Occurrence, report display
type 84
Print Report Definition window 25
Print Setup, menu item 11
printing
chapter 141-145
custom reports 142
modified reports 141
overview 141
preprinted reports 159
reports with temporary tables 144
Printing and Mailing Reports, part
140-150
procedures
Adding a company image to a
report template document
208-209
Adding a picture to the picture
library 129-130
Adding an item to a report
template document 205-206
Creating a calculated field 58-59
Creating a modified report 106
Creating a modified report
template document 218-221
Creating a new report template
document 213-216
Creating additional footers 73-75
Creating additional headers 73-75
Defining a new report 20-25
Defining a table relationship 96-99
Defining report restrictions 47-48
Exporting a package file 184
Importing a package file 185-186
Importing from a reports
dictionary 187-188
Mailing a report 148
Modifying a string 133-134
Printing custom reports 142-144

procedures (continued)
Printing modified reports 141-142
Removing an item from a report
template document 206-207
Starting the Report Writer 9
Updating the data source for a
report template 223-224
Using a modified report template
document 221-222
Using a picture from the picture
library 130
Using legends 77-78
Validating reports 188-189
Viewing from the Report Writer
109-110
Viewing virtual table information
101-102
Process Monitor, menu item 12
processing issues, for report template
documents 226
product support, for Report Writer 3
products, selecting product to modify 9
properties
for drawn objects 37
for fields 36
setting 35
Properties window, using 34

R
radio buttons, defined 237
radio groups
defined 237
use in reports 39
records
defined 237
described 89
maximum number for a report 21
skipping blank records 22
rectangle tool, using in report layout 31
Remove button, how used in Report
Writer 16
removing modified reports 182
report definition
chapter 19-25
creating 19
described 19
for Word Template reports 194

I N D E X

report definition (continued)


printing 25
Report Definition window 19
Report Design, part 152-170
Report Design Guidelines, chapter
153-155
Report Destination window 195, 223
report document templates
column pattern 211
form pattern 210
Report Field Options window 79
report fields
defined 237
use in calculated fields 61
use in report sections 85
Report Footer table
in report template document 202
layout of 203
report footers, use in reports 29
Report Header table
example 203
in report template document 202
layout of 203
report headers, use in reports 29
Report Layout, chapter 27-41
Report Layout window 27
Report Restriction Definition window
47
Report Table Relationships window 21
Report Template Design, chapter
201-211
report template documents
adding items 205
assigning for modified reports 222
Body table 202
bookmarks for 207
common patterns 210
company images in 208
creating 213
creating based on existing
templates 214
creating for modified reports 218
creating layout with tables 203
creating new 213
defined 237
described 194
designing 201

report template documents (continued)


displaying item properties 207
for modified reports 217
how processed 196
layout issues 225
Microsoft Word settings for
editing 199
Page Footer table 202
Page Header table 202
processing issues 226
purpose 194
removing items 206
Report Footer table 202
Report Header table 202
source for items in the layout 206
structure 201
tables used in 201
tips for working with 209
updating data source for 223
using for modified reports 221
Report Templates for Modified
Reports, chapter 217-224
Report Writer
accessing 177
configurations 175
controlling access 177
described 2
exiting 12
getting started 7
interface 11
local reports dictionary 175
menus 11
network reports dictionary 175
packaging a project 183
printing from 144
returning to the main application
12
security task 177
selecting a product 9
starting 9
storing reports 8
tasks 7
terminology 8
toolbar 11
types of modifications 7
viewing reports 110
ReportID, report property 35

reports
adding fields 30, 33
adding pictures to 31
adding tables to 20
additional footers 29
additional headers 29
aligning fields 32
arranging items in layout area,
described 32-33
body, described 29
changing field types 82
common modifications 113
defining, procedure 20-25
empty fields, hiding 79
exporting to a file 149
field characteristics 38
finding report names 105
footer printing options 24
for exporting data 150
format options 22
formatting fields 80, 81
generating as Microsoft Word
documents 193
generic fonts 40
groups 161
header printing options 24
hiding fields in layout 79
importing from other dictionaries
187
layout window
described 27
illustration 27
sections 28
legends 77-78
limiting the records included 21
mailing 147
main table for report 20
modified reports 105
modifying report layout 113
optimizing 155
packaging 183
page footers, described 29
page headers, described 29
page orientation 22
positioning items in 33
printing
on preprinted forms 24

USERS

GUIDE

245

I N D E X

reports (continued)
printing
options 24
overview 141
printing report definition 25
report footers, described 29
report headers, described 29
report sections, chart 28
restrictions
defining 47-48
described 47
restriction functions 49-56
secondary tables 97
series 20
sizing items in 33
sorting
using a sorting definition 43
using main table key 43
storing 8, 173
table relationships
defining 96-99
described 95
illustration 96
template-enabled 193
text report options 23
tile tools used in layout 32
totaling and subtotaling 165
using report footers 25
validating 188
viewing modified reports 109
reports dictionary
changing location 174
changing name 174
core resources 173
default location 174
default name 174
defined 237
described 173
launch file 174
modified reports 173
storing locally 175
storing on network 175
Reports Library
defined 237
described 116
Reports on the web, see Reports Library
Reports window 193, 214, 218

246

U S E R S

G U I D E

Resource Descriptions tool


accessing 12
defined 237
resource list windows
defined 237
described 13
resources, defined 237
Resources menu, described 12
restriction functions, described 49
restrictions
adding to reports 47
chapter 47-56
RGT_STR, calculated field function 66
rounded rectangle tool, using in report
layout 31
Running Sum, report display type 84
running sums for reports 165, 196
runtime engine, defined 237
RW_Address, user-defined function
231
RW_CityStateZip, user-defined
function 232
RW_GetAccountNumber, user-defined
function 233

S
scaling graphics and logos 131
Screen Output window 107
Search for Help On, menu item 13
Section
drawn object property 37
field property 36
sections
colorizing 28
in reports 28
security
accessing custom reports 179
accessing modified reports 178
accessing the Report Writer 177
accessing third-party reports 180
setting access to customized
resources 186
Security Role Setup window 177
Security Task Setup window 180
segment options, for key segments 137
Select All, menu item 12

Selecting a Report to Modify, chapter


105-107
Series, report property 35
series
defined 237
for reports 20
for tables 135
Setting Up Microsoft Word, chapter
197-199
settings box
illustration 35
using 35
setup tables, described 93
Shape, drawn object property 37
size to default tool, using in report
layout 32
size to narrowest tool, using in report
layout 32
size to shortest tool, using in report
layout 32
size to tallest tool, using in report
layout 32
size to widest tool, using in report
layout 32
Size-Height
drawn object property 37
field property 37
Size-Width
drawn object property 37
field property 37
sorting
chapter 43-45
for groups 162
key segment options 137
reports 43
sorting definition
creating 43
sorting options 44
Sorting Definition window 44
starting the Report Writer 9
StartTemplateDocumentHeaderBookm
ark, described 207
StartTemplateSectionRepeating
bookmark, described 207
static text values
defined 237
described 120

I N D E X

Static Text Values window 121


static values
adding to report template
documents 205
described 120
static text values 120
storage types, defined 237
Storing and Accessing Reports, part
172-189
Storing Reports, chapter 173-176
STR_CUR, calculated field function 66
STR_DAT, calculated field function 66
STR_LEN, calculated field function 66
STR_LNG, calculated field function 66
STR_VCUR, calculated field function
67
String Definition window 134
string expressions, defined 237
string formats
described 125
example 125
format options 125
using format fields 82
string resources, defined 237
strings
chapter 133-134
defined 237
described 133
example 133
formatting 125
modifying, procedure 133-134
using 133
STRIP, calculated field function 67
structure, for report template
documents 201
substituting fonts for reports 40
SUBSTRING
calculated field function 67
report restriction function 54
subtotaling data for reports 165
subtraction operator, use in calculated
fields 59
Sum, report display type 84
SUMMATION, report restriction
function 56
summing data for reports 165
support, available for Report Writer 3

suppressing
additional footers 74, 75
additional headers 74
symbols in documentation 3
system-defined functions
CUR_STR, described 64
DAY, described 64
DAY_NAME, described 64
DOW, described 65
INT_STR, described 65
LFT_STR, described 65
LNG_STR, described 65
MONTH, described 65
MONTH_NAME, described 65
nesting in calculated field 64
POWER_10, described 65
RGT_STR, described 66
STR_CUR, described 66
STR_DAT, described 66
STR_LEN, described 66
STR_LNG, described 66
STR_VCUR, described 67
STRIP, described 67
SUBSTRING, described 67
UCASE, described 68
using in calculated fields 63
WILDCARD, described 69
YEAR, described 69

T
tab-delimited files, saving reports to
149
Table, field property 36
Table Descriptions, menu item 12
table groups
described 92, 93
example 94
purpose 94
Table Relationship Definition window
97
Table Relationship window 97
table relationships
chapter 95-99
creating, procedure 96-99
defined 237
described 95
for virtual tables 102

table relationships (continued)


illustration 96
one-to-many relationship,
described 95
one-to-one relationship, described
95
overview 95
predefined 95
secondary tables 97
types 95
TableName, field property 36
tables
chapter 135-138
database types, described 135
defined 237
described 90, 135
display names 135
example 91
in Microsoft Dynamics GP 92
keys
described 91, 136
key options 137
names 92, 135
physical names 135
relationships between 95
structure, illustration 91
table relationships 95
table series 135
terminology 89
types of 93
task, security task for Report Writer 177
tasks, accomplished with the Report
Writer 7
technical name, described 92
technical support, for Report Writer 3
Template Processing Engine
described 196
restarting 227
troubleshooting 227
template-enabled reports
defined 237
described 193
how to create 194
temporary tables, described 144
terminology
for data storage 89
for Report Writer 8

USERS

GUIDE

247

I N D E X

text, aligning 124


text attachments, mailing reports as
147
text fields, use in reports 39
text files, saving reports to 149
text reports
defined 237
line spacing 23
options 23
text size 23, 41
text tool, using in report layout 31
The Report Writer Interface, chapter
11-16
third-party reports, accessing 180
tile horizontally tool, using in report
layout 32
tile vertically tool, using in report
layout 32
time tool, using in report layout 31
time values, use in reports 39
toolbar, described 11
Toolbox
defined 237
for reports 30
illustration 30
totaling data for reports 165
Troubleshooting Templates, chapter
225-227
Type, report property 35
types of modifications 7

U
UCASE, calculated field function 68
Undo, menu item 12
Unique, key option 137
user-defined functions
common functions 231
using for reports 69
using in calculated fields 63, 69

V
validating reports 188
VBA
defined 237
setting report legends 77
using to modify reports 115
vertical alignment, for preprinted
reports 159

248

U S E R S

G U I D E

Viewing a Modified Report, chapter


109-111
virtual tables
chapter 101-102
defined 237
described 101
elements 101
linking to 102
overview 101
using in reports 102
viewing information 101
Visibility, field property 37
visual switches, use in reports 39

W
warning symbol 3
WILDCARD
calculated field function 69
report restriction function 56
window controls
lookup button 15
standard buttons in Report Writer
15
Window Descriptions, menu item 12
Window Help, menu item 13
windows in Microsoft Dynamics GP
Alternate/Modified Forms and
Reports 110, 178
Edit Launch File 174
New Template 215, 219
Report Destination 195, 223
Reports 193, 214, 218
Security Role Setup 177
Security Task Setup 180
windows in Report Writer
Calculated Field Definition 57
Data Type Definition 119
Drawing Options 40
Field Definition 127
Format Definition 123
Import Reports 188
Picture Definition 129
Print Report Definition 25
Properties 34
Report Definition 19
Report Field Options 79
Report Restriction Definition 47

windows in Report Writer (continued)


Report Table Relationships 21
Screen Output 107
Sorting Definition 44
Static Text Values 121
String Definition 134
Table Relationship 97
Table Relationship Definition 97
Windows menu, described 13
Word Templates
add-in for Microsoft Word 197
adding items to a report template
205
capabilities of 196
common patterns for reports 210
how processed 195
layout using tables 203
limitations of 196
overview 193
part 192-227
report definition usage 194
report template document 194
setting up Microsoft Word 197
template design 201
Template Processing Engine 196
template-enabled reports 193
troubleshooting 225
using company image 208
work tables, described 93
WYSIWYG, defined 238

Y
YEAR calculated field function 69

You might also like