> Word Printing

Word Printing

As an alternative to printing your documents on pre-printed stationery, you can configure SYSPRO to allow you to print your stationery documents using Microsoft Word.

Aside from being able to use the extensive design features that are available with MS Word, an added advantage is that you do not need to purchase pre-printed stationery for the printing of your documents.

In addition, sample templates for the various formats are provided as standard. You can optionally design your own templates, indicating which fields you want to print and at what position on the document.

Implementation

The following are the prerequisites to printing your stationery documents using Microsoft Word:

  • You must have Microsoft Word 97, or a later version, installed on your workstation.
  • You must install the Office Automation module as part of your license agreement (Company Maintenance).
  • You must enable Windows printing (SYSPRO ribbon bar->Setup->Windows Printing).
  • You must configure a default Windows printer that is available for use within the system (SYSPRO ribbon bar->Setup->Print Setup).
  • A working knowledge of MS Word and an understanding of MS Word templates, is essential.

Activating the MS Word Print facility

You activate the option to print your stationery using MS Word separately within each stationery format program that caters for this facility.

Currently, the following SYSPRO stationery formats cater for Word Printing:

  • AP Check Format

    You can only activate Word printing for this format if you selected to print separate checks and remittances.

  • AR Statement Format
  • AR Permanent Entries Format
  • Inventory Document Format

    • Stock receipts
    • Issues
    • Transfers out
    • Purchase order receipt
  • Purchase Order Document Format

    • Local
    • Foreign
    • Requisitions
    • Blanket contract

    You can print graphical multimedia items associated with the purchase order number when printing purchase order documents.

    You can print graphical multimedia items associated with the contract number when printing Blanket contract documents.

    If you select to print multimedia items on your documents then you will be required to specify the multimedia category to which the item belongs. This category is appended to the bookmark name.

  • Inventory Inspection Documents

    • Inspections
    • Scrap
    • Reject

    The inspection document formats contain only detail sections.

  • S/O Document Formats

    • Invoice
    • Delivery note
    • Order acknowledgement
    • Dispatch note

    To cater for multiple sales tax lines, sales tax fields are inserted as part of the detail section (instead of the totals section).

  • Quotation Format

    The Offer print method configured against the quotation (Preferences) will determine whether additional fields are available to print on your quotations.

    Ensure that the Offer print method you select corresponds to the template layout (i.e. do not try to print a Multiple lines format on a template that was designed as One per document.

    Similarly, if you select Multiple columns at the Offer print method field, ensure that the entry against the Number of offers across page option correlates with the template design.

  • Factory Documentation Format

    Because this format does not have a total section, you are only required to define one continuous section break.

    The format does, however, cater for a second optional continuous section break in which you can insert any of the heading fields.

    You can print graphical multimedia items associated with the job number and the stock code when printing factory documents.

In each of the above programs, you activate the facility to print using MS Word by selecting the stationery format program you want to configure, and selecting the Print using MS Word option.

Once you have indicated that you want to print using MS Word, you select the MS Word Options format option to configure the various settings required.

MS Word Options

The MS Word Options dialog is divided into four main areas:

  • Template Options
  • Attachment Options
  • Template Status
  • General Options

The Template Options and Template Status groups are available for all stationery formats but the Attachment Options and General Options groups are optional and may not be available for all formats.

Field Value Description
Template options    
Template location

You use this option to indicate where the template must be saved.

In a client/server environment you can specify whether you want to store the template on the client or the server.

Client

Select this to store the template on the client machine.

This is the default selection.

In a client/server environment, templates are created on the client and copied back to the server during the analysis phase.

Server

Select this to store the template on the server.

The option to save templates on the server is only available in Client/Server or mapped-drive environments.

Templates can be stored on a non-Windows server.

Templates residing on the server are stored in the Base\Template folder of your SYSPRO installation.

If the template is stored on the server, then when it is required by the client workstation, it is first copied to a temporary folder on the client. This reduces unnecessary network traffic. If the template already exists on the client then an attempt is made to delete it. If the file cannot be deleted then you will not be allowed to continue with the design process.

Template name

This indicates the name of the Word template you want to use for the stationery document.

This field cannot be left blank.

If you selected to store the template on the Client, then you must specify the full path to the template document.

If you selected to store the template on the server, then only the name of the template must be entered. The template is stored in the Base\Template folder of your SYSPRO installation.

The template name cannot contain spaces if it is stored on the server. If a template exists on the server with the same name then a numerical suffix is added to the template name ensuring that any existing file is not overwritten.

Header section

This indicates how you want to configure fields from the header section of the stationery format on the document that is produced.

[Note]

If your template layout requires a header section to be defined, then you must configure one in order to complete the design phase.

Print on first page only This indicates that all heading fields configured for the format must be printed on the first page of the report only.
Print on all pages This indicates that all heading fields configured for the format must be printed on each page of the report.
Header section break not required Select this if you do not require heading fields to be printed or if you want all heading fields configured for the format to be printed in the Document Header section of MS Word.
Detail section This indicates how you want to configure fields from the detail section of the stationery format on the document that is produced.
Print using a line count

This indicates that you want to specify the number of detail lines that must be printed on each page.

You use the Maximum number of detail lines per page field to enter the required number of lines.

Use the entire page

This indicates that you want the system to calculate the number of detail lines that can be printed on a page.

This option is significantly slower than the Print using a line count option.

  Refer to Print using a line count vs Use the entire page for additional information.
Maximum number of detail lines per page

This field is only enabled if you selected the option: Print using a line count.

You use this field to specify the maximum number of detail lines to print on each page.

This cannot be zero.

Optional third section

This indicates how you want to configure fields from any non-detail section of the stationery format on the document that is produced.

Non-detail fields include fields from the Totals section of the stationery format as well as heading fields from the Header section of the stationery format.

[Note]

If your template layout requires a third section to be defined, then you must configure one in order to complete the design phase

Print on last page only This indicates that any non-detail fields assigned to the optional third section of the template must be printed on the last page of the report only.
Print on first page only This indicates that any non-detail fields assigned to the optional third section of the template must be printed on the first page of the report only.
Print on all pages This indicates that any non-detail fields assigned to the optional third section of the template must be printed on each page of the report.
Total section break not required This indicates that you do not require fields to be assigned to the optional third section of the format, or that any non-detail fields configured for the optional third section of the format must be printed in the Document Footer section of MS Word.
Attachment options  

This option enables you to append a file attachment to the end of each document produced from this format.

[Note]

These attachment options are ignored if the file attachment is not found at the time of printing the stationery format document (i.e. The document is produced without the attachment).

Attach document

Select this option if you want to attach a document to your template.

If you select to attach a document, then the filename entered in the Attachment name field is appended to the end of each document that is created using the current format.

Attachment location You use this option to indicate whether the file attachment resides on the client or the server workstation.
Client Select this to save the attachment on the client machine.
Server

Select this to save the attachment on the server.

The option to save the attachment on the server is only available in a Client/Server environment.

Attachment name This indicates the name of the file that you want to append as an attachment to each document produced from this format.
Template status  

A template must be analyzed before it can be used for printing a document.

If the date and time on which a template was last saved differs from the date and time it was last analyzed, then this indicates that the template was modified after it was last used for printing the document. The template must therefore be analyzed, to recognise the changes made, before it can be used for printing the document. These fields therefore enable you to see if the template is ready for use.

Details of when the Template was last saved

This indicates the date and time that the current template was last saved.

[Note]

If the date and time reflected here matches the details of when the template was last analyzed, then the template is ready to be used. If not, then the template must be analyzed.

Date This field displays the date on which the template was last saved.
Time This field displays the time when the template was last saved.
Details of the Template when it was last analyzed This indicates the date and time that the saved version of this template was last analyzed.
Date This field displays the date on which the saved version of the template was last analyzed.
Time This field displays the time when the saved version of the template was last analyzed.
General options    
Suppress leading spaces for all numeric fields

Select this to remove all leading spaces for numeric fields. This enables you to reduce the likelihood of numeric fields wrapping within a table.

If selecting this option results in the misalignment of fields containing decimal points, you can use decimal tab stops in Word to correct this.

Print operations before materials

This option applies only to the Factory Documentation Format and enables you to indicate whether you want to print operations before materials.

[Note]

You will be unable to select this option if you have enabled the option to sequence materials by operation number (Options).

Split detail notes, narrations and text

This option currently only applies to the Factory Documentation format.

This option is used if your operations and materials narrations are too long to fit into the detail section of a single page. If you select this option, then the narrations can be split over more than one page. This applies if you selected the option: Use the entire page for the Detail section.

This also applies if you defined your Detail section to be a set number of lines (Print using a line count) and the number of narration lines exceeds the number of detail lines available. If you select this option, then the narrations are split over two or more pages.

Perform word wrap for notes, narrations and text

This option currently only applies to the Factory Documentation format.

Select this if you want to print all notes in a single cell. This enables you to design a template which uses up all the available horizontal 'white space' taken up by individual cells in order to print the notes in as few lines as possible.

If you select this option, then the system attempts to join the separate lines of 60 characters into ordered sentences and paragraphs.

Design Template  

This function enables you to design the required template.

To use the Design Template function, you must make an entry at the Template name field. If you indicated that the template resides on the client workstation, then you must enter a full path. If the specified template does not exist then you are prompted to create the template.

OK   Select this to accept the information you entered.
Cancel   Select this to ignore any information you entered and to return to the previous screen.

Design Template

Once you have configured the MS Word Options for the applicable Stationery Format program, you select the Design Template function to open the applicable Word template and insert the fields that you want to print on your stationery.

If the selected template already exists, then the template is opened and the Template design dialog is displayed.

If the template does not exist, then you are prompted to create the template (see Create Template ).

When you open the template in design mode, SYSPRO has to change the template to insert the default text against the bookmarks. This text is then removed when the template is closed. You are therefore prompted to save the template even if you have made no changes to it. At this point, a resource conflict can occur.

Resource conflicts can also occur when opening a document that is not based on the template because all Microsoft Word documents are ultimately based on the normal .dot file. Using Microsoft Word as the email editor in MS Outlook can also cause this type of resource conflict.

[Note]

To reduce the chance of document resource conflicts, it is recommended that no other documents are opened (or already open) with Microsoft Word when using MS Word printing, or when designing a template.

Within each of the Stationery Format programs, you assign fields from a Design Template window. These fields are grouped according to Non Detail and Detail areas of the format.

The Non Detail area contains a Heading and a Total section. The Detail area contains sections that vary according to the format that is being maintained.

The title bar of the screen displays the format of the template you are maintaining as well as the current field group in use.

You select the fields to view using the View menu and selecting to view either Non Detail or Detail fields. You can then select the specific fields to view.

Once you have indicated the section you want to configure, you can insert the relevant fields.

Field Value Description
Bookmark  

This indicates the name of the field you want to insert into the template. The field name is inserted as a bookmark.

[Note]

You will be unable to insert the same field more than 10 times on a format.

Insert  

Select this to insert the field in the template.

To view the bookmarks (fields) you have inserted into the template, you select the List Bookmarks option from the File menu.

The Word template must be in Page or Print view when you insert bookmarks.

Validated  

You use this function to identify significant errors in the template (i.e. Errors that will prevent you from successfully printing the stationery format document).

Warnings and critical error notifications are displayed in a listview pane.

The validate function verifies that you have defined the correct number of sections and that bookmarks are correctly placed in tables within the detail section.

For additional information on validating, refer to Validate Template.

Analyze & Exit  

You use this function to validate and analyze a template in one operation, rather than performing these tasks individually.

For additional information on analyzing, refer to Analyze Template.

Remove Bookmark   If you selected the List Bookmarks option from the File menu, then you use this function to remove the highlighted bookmark from the template.
Hide List   If you selected the List Bookmarks option from the File menu, then you use this function to hide the list of bookmarks you inserted into the template.
Show List   If you selected the List Bookmarks option from the File menu and then selected the Hide list function, then you use this function to redisplay the list of bookmarks you inserted into the template.

Additional options are available from the Menu bar.

Field Value Description
File    
  Convert This option enables you to update older style templates (i.e. ones that made use of form fields) to the new style template that uses bookmarks. For additional information on converting, refer to Convert Template
  List Bookmarks Select this option to view a list of the bookmarks used in the template. The listview displays the name of the bookmark, the section that contains the bookmark and the index number of the bookmark within the section of the template.
View    
  Non Detail You select this option to select to view either the Heading or the Total fields from the Non Detail option sub menu.
  Detail You select this option to view the detail line types for the format. The available detail line types displayed are relevant to each document format.
  Offer Number This option is only available for Quotation document formats (see Quotation Format). If you are maintaining a template for a multiple offer Quote, then the available offer numbers are displayed as sub menu choices. This enables you to select the required offer number for which to insert fields.
Options    
  Stay On Top You select this option to force the Template Design dialog to remain in the foreground when the focus is within Word.
  Insert Default Text You select this option to select whether or not to insert default text at the bookmark's location. Deselecting this option makes it more difficult to see where a bookmark is positioned.
  Show Default Text You select this option to either show or hide the default text against all of the bookmarks in the template.

Create Template

This screen is displayed if, at the Template name field of the MS Options screen, you enter the name of a template which does not exist (i.e. You are creating a new template).

Field Value Description
New template options    
Create blank template

This creates a blank document template that contains no sections.

Any of the MS Word layout views can be used when designing a template.

Create default layout This creates a new document template that is formatted according to the basic requirements of the stationery format you are configuring (i.e. the system attempts to assign the correct number of sections, etc., and to provide guidelines on the placement of fields and tables).
Based on sample template

This creates a new document template based on an existing sample (i.e. a template that resides in the Base\Samples folder of your SYSPRO installation). In a client/server environment this will be on the server.

If you select this option then you must indicate the existing sample template you want to use.

Based on existing template

This creates a new document template based on an existing template that you have created (i.e. a template that resides in the Base\Template folder of your SYSPRO installation.

If you select this option then you must indicate the existing template you want to use. The existing sample template must reside in the Samples folder of the SYSPRO Base folder. In a client/server environment, the sample template must exist in the Samples folder on the server.

Browse on client This option is enabled only if you are operating in a client/server environment. It enables you to locate templates on the client machine.
Create  

Select this to create the new template according to you selections.

Once the template is created it is opened as it would have been if the template already existed.

In a Client/Server environment, the template is created on the client machine and copied back to the server during the analysis process.

Cancel   Select this to ignore your selections and to return to the previous screen.

Bookmarks

Bookmarks are used to insert SYSPRO fields into the various areas of the document.

Using bookmarks also enables you to use Word's Header and Footer areas, as well as some of Word's other objects, for example the Text box.

When you insert a Non-Detail bookmark, SYSPRO checks to ensure that it is not being inserted into the Detail section of the template. Similarly, when you insert a Detail bookmark, SYSPRO checks to ensure that it is being inserted into the Detail section and that it is being inserted into a table.

When you insert any bookmark, SYSPRO checks to see if any other bookmarks have already been created for the same field. If SYSPRO finds that the field already exists, then SYSPRO attempts to create a new bookmark for the same field, but with a numeric suffix attached. Up to ten instances of the same field can be inserted into the template. The original bookmark (e.g. CompanyName) and up to nine bookmarks with a suffix (e.g. CompanyName1). Once ten bookmarks for the same field have been inserted the message "Cannot insert the bookmark. The maximum number of entries has been exceeded" is displayed.

If the original bookmark name is 40 characters long, then the message "Cannot insert a duplicate bookmark. The field's name is already 40 characters long" is displayed. This is because Word limits the length of a bookmark name to 40 characters.

General guidelines on Inserting Bookmarks
  • To insert a custom bookmark, first insert a single character (e.g. a space) then select the character and select "Bookmark" from the "Insert" menu.

    If you want the bookmark to be available after the document has been rendered during the print phase, then the bookmark must be prefixed with "ub_". The prefix is not case sensitive. The bookmark must contain at least one character.

  • Always ensure that there is at least one character between bookmarks.

    If not, there is a high probability that data will not be printed in the document.

  • When inserting a bookmark into a cell of a table, ensure that the cursor is placed inside the cell and that the entire contents of the cell are not selected.

    Selecting the entire contents of the cell can cause problems when SYSPRO populates the document with data.

  • A bookmark cannot be inserted into the template when Word is minimized.

  • A bookmark cannot be inserted when you have more than one document open and the template is not the active document.

Validate Template

The validation process attempts to locate all the known errors within the template.

Errors found are displayed in a listview window below the design screen. The listview displays the following information:

  • An icon indicating whether the error is a warning or a critical error.

    A warning message is depicted by an exclamation mark on a yellow background. A critical error is shown by a cross on a red background.

    Errors that can affect how the template is produced are listed as warning messages.

    All errors that could cause the print process to end abnormally are listed as critical errors.

  • The error message itself.

    This message should provide some indication as to the nature of the error.

  • The section that contains the error.

    This helps to narrow down the cause of the problem.

    The section is one of the following areas: Word Header, Document Header, Document Detail, Document Total and Word Footer.

  • The index number of the object that caused the error.

    If the object that caused the error is part of a collection of objects in Word, then this value points to its position within the collection.

    This value is used internally by SYSPRO and may be of little or no benefit to you.

  • Additional information that may assist you in locating the error.

    If a bookmark caused an error, then this column contains the bookmark name.

When you select an error in the listview, SYSPRO attempts to select the area of the template that caused the problem.

It is not always immediately apparent which area of the template was selected. If focus is set on the Word session, without selecting the document itself, and the error is still not displayed, then make use of the information supplied in the listview to locate the error.

The following are issues which the validation process tests:

  • Text wrapping is switched on for this table. This can result in slower run times.
  • Text wrapping is switched on for this table. This is only allowed in the Total section.
  • Template contains more than 1 page.
  • Template contains too few sections.
  • Template contains too many sections.
  • Header section contains no bookmarks.
  • No tables found in Detail section.
  • Detail section contains no bookmarks.
  • Bookmark found outside table in Detail section.
  • Non detail bookmark found in detail section.
  • Total section contains no bookmarks.
  • Detail bookmark found in Header section.
  • Detail bookmark found in Template Header section.
  • Detail bookmark found in Total section.
  • Detail bookmark found in Template Footer.
  • The bookmark is not valid for this document format.
  • Section can only contain 1 table with 'Text Wrapping' switched on
  • Continuation message cannot be in a table.
  • The line containing the Continuation message should not have any other bookmarks on it.
  • The Total section makes use of 'Text wrapping' on a table. No other bookmarks, other than the continuation message, are allowed.
  • The template has not been converted yet. If it is not converted then errors will occur during the print phase.
  • Multiple bookmarks found in the same range.
  • Bookmark found contained in another bookmark.
  • Two or more bookmarks found adjacent to each other without any other character between them (e.g. a space).
  • Bookmark found overlapping another bookmark.

It is important to thoroughly test a template using your Test company before using it in a live environment.

Analyze Template

Before a template is analyzed it is automatically be validated.

If errors are encountered, then the analysis phase is halted and you are given the opportunity to correct the error(s).

The two possible scenarios are:

  • One or more warning type error messages were found, in which case the following options are available:

    • Continue with the analysis phase.
    • Exit without performing the analysis.

      If you select this option, then any changes that you made since the last time you saved the template may be lost.

    • Cancel the analysis and return to design mode.
  • At least one critical error was found for which the following options are available:

    • Exit without performing the analysis.

      If you select this option, then any changes that you made since the last time you saved the template may be lost.

    • Cancel and return to design mode.

After the validation phase is complete, and, assuming that the analysis phase has not been canceled, the Default text is removed from all bookmarks. This is done to save time during the print phase. You will therefore always be prompted to save the template, even if you have not made any changes.

The analysis phase processes the template and stores the following information:

  • A list of each bookmark in the Header and Total section of the document.

  • Whether a continuation message is used or not.

  • The breakdown of each table into it's header and data portions.

  • A list of bookmarks in each row, of each data portion, of all the tables in the detail section.

Convert Template

The Convert option (selected from the File menu) enables you to update older style templates (i.e. Ones that made use of form fields) to the new style template that uses bookmarks. These older templates must be converted before they can be used.

Every time a template is validated a check is performed to determine if it contains any form fields that have a name matching any of the valid bookmarks for the format. If any of these form fields are found you are prompted to convert the template.

Form fields can still be used in your template, but you must ensure that the name you use for the form field does not match any of the bookmark names for the format.

The conversion process attempts to convert all form fields found in the template into bookmarks.

If form fields are found that do not have a name, then a bookmark is created with the name "noname" together with a numeric suffix. This suffix starts at one and is incremented for each nameless form field found in the template.

If the form field did not have default text associated with it, then the bookmark is created with it's own name as the default text.

Configuring Sections

Within each of SYSPRO's Stationery Format programs, you assign fields from a Design Template window. These fields are grouped according to Non Detail and Detail areas of the format.

The Non Detail area typically comprises a Heading section and a Total section.

The Detail area comprises sections that vary according to the specific format that is being maintained. For example: The Detail section of the Factory Documentation format includes a Material requirements Details section and an Operation Detail section.

You must insert a continuous section break between each section of a format. It is the continuous section break that enables SYSPRO to identify the different sections.

You need to ensure that there is at least one space break between:

  • the information in MSWord's Header and the Heading section of the document
  • the Heading section and the first section break
  • the first section break and the table in the Detail section
  • the Detail section and the second section break
  • the second section break and Total section/table

    The size of these space breaks can be small (for example 2).

Header Section

The Header section of a SYSPRO format refers to that area of the document that occurs before the first continuous section break.

Although you do not have to insert fields into tables for the Header section, we recommend that you use tables to assist in aligning fields and formatting text. The alternative is to use tabs and tab stops (i.e. use Ctrl+tab to insert a tab).

While using tabs and tab stops is an effective method of aligning fields and formatting text, problems are more likely to arise when using these methods. One reason for this is that at run time SYSPRO replaces the bookmarks with data and this data can inherit the formatting style of the previous field. To avoid this you can use multi-column tables, where the fields are separated into different cells. In this way the formatting of each field is preserved.

[Note]

There is no limit to the number of tables that can be included in the Header section of a SYSPRO format.

The table position cannot be locked in the Header section of the document.

The use of tables within the heading section is optional. If you use tables, then you must insert a carriage return before the first table and after the last table to avoid possible formatting problems.

The Header section in SYSPRO is not the same as the header section in MS Word. If, however, you choose to assign some (or all) of the SYSPRO Header section into the MS Word header area, then you must select the MS Word option: Header section break not required.

The Word header and footer option "Different first page" can be used in a template.

Detail Section

The detail section of a SYSPRO format refers to that area of the document that is located after the first continuous section break.

Unlike the Header section (where the use of tables is optional), all fields in the detail section must be inserted into tables.

Depending on the number of fields used in the header and total sections, a maximum of about 20 tables can be included in the detail section of a SYSPRO format.

[Note]

Multiple bookmarks can be assigned to a single cell (or column) providing they are separated by at least one character (e.g. a space, full stop, carriage return, etc).

When the template is analyzed or validated, a warning message is displayed if more than one bookmark appears in a single cell. Although you can ignore the warning and save the template, if these bookmarks are adjacent to one another (i.e. not separated by at least one character) then some (or all) of the data in the field is not printed.

Cells in the detail section cannot be vertically merged. This is because Word printing analyzes the detail section on a row by row basis and Word does not allow a single row selection in a table when cells are merged across two or more rows.

The table position cannot be locked in the detail section of the document.

It is possible, but not advisable, to place fields from two or more detail line types on the same row of a table.

Table Layout Options

There are a number of ways in which you can configure tables in the Detail section of the format. These methods include using a single table or multiple tables. In general, the more tables you use in the layout of the detail section, the more space is wasted when changing between tables.

[Note]

You must enter a carriage return between tables and between a Section Break and a table.

  • Different detail line types can be placed into different rows of the single table.

    This method makes for a template that is easy to read and produces a document without a lot of whitespace. Additionally, you can apply different formatting options to the rows, which means you can make clear distinctions between specific rows.

    Using a Single Table in the Detail Section:

    Detail line Stock code Warehouse
    Stock description Stock code long description  
    Lot Lot quantity Lot expiry date
  • Different detail line types can be placed into the same row of a single table.

    [Note]

    If you use this method, then you must ensure that at least one character is placed between each bookmark in a cell.

    You would use this method to save space.

    Using a Single Table in the Detail Section:

    Detail line Stock code Warehouse
    Stock description Stock code long description  
    Lot Serial number Lot quantity Serial description Lot expiry date Serial expiry date
  • Each type of detail line can be placed into its own table.

    This method is recommended when you require an obvious distinction between the different detail line types.

    Using Multiple Tables in the Detail Section:

    Detail line Stock code Warehouse
    Stock description Stock code long description  
    Lot Lot quantity Lot expiry date
  • One detail line type can be placed into more than one table.

    In this example, the General detail line is split across two tables. Note that this wastes space.

    Using Multiple Tables in the Detail Section:

    Detail line Stock code Warehouse
    Stock description Stock code long description  
Column headings

There are a number of ways in which you can configure columns in the Detail section of the format. The method you chose depends on individual preference as well as the type of data being presented. A mixture of all methods can be used.

  • You can place column headings at the end of the Header section, just before the first continuous section break:

    Heading Table:

    Detail line Stock code Warehouse

    Detail Line Table:

    Detail line Stock code Warehouse
    Stock description Stock code long description  
  • You can include the column heading as part of the table, after the continuous section break:

    Heading and Detail Lines in one Table:

    Detail line Stock code Warehouse
    Detail line Stock code Warehouse
    Stock description Stock code long description  
  • You can place column headings within cells alongside the bookmarks:

    Heading and Detail Lines in one Table:

    Detail line Stock code Warehouse
    Detail line Stock code Warehouse
    Stock Description Stock description -- Stock code long description  
[Note]

Do not design a table with rows that have no bookmarks after a row that contains bookmarks.

For example:

Detail line Stock code Warehouse
Detail line Stock code Warehouse
Stock description Stock code long description  
Lot Number Quantity Expiry Date
Lot Lot quantity Lot expiry date

In this example, the 3rd row contains bookmarks and 4th row does not. Row 4 will never be printed on the document.

When the document is created, the only rows without bookmarks that are inserted into the document are those contained in the header portion of the table.

Print using a line count vs Use the entire page

SYSPRO uses one of two methods to populate data in the Detail section of the document:

  • Print using line count
  • Print using the entire page
Field Value Description
Print Using Line Count  

When you design a template based on the line count, the value specified at the Maximum number of detail lines per page field represents the total number of printed lines and not the total number of lines extracted to print. Thus, although a merchandise detail line is one line on an invoice, it can result in several lines being printed on the document. Note that the blank lines between tables increase the line count.

Within the Detail section of a format, each table is broken down into several portions, each of which is analyzed separately. These portions can be referred to as the table heading and the table data portions.

Table heading portion

The table heading portion begins after the first continuous section break until the end of the last row of the table that does not contain a bookmark.

If you have configured more than one table in the detail section, then table headings for subsequent tables apply from the end of the previous table to the paragraph before the next table (each table must have at least one paragraph before and after it).

Table data portion

The table data refers to the individual rows of the table into which you have inserted fields that will be populated with data when printing the document. The table data portion applies to everything after the table heading until the end of the last row of the table.

[Note]

SYSPRO does not detect carriage returns within a cell. This can result in inaccurate line counts.

Each time a new table with a column heading is inserted, an additional 2 lines are consumed (i.e. the paragraph after the previous table and the column heading row).

To best use the space available (where multiple tables are configured) we recommend that you structure these tables logically (i.e. repeating a sub group in different tables on the format consumes additional lines).

Use the Entire Page  

When you select this option, SYSPRO calculates the number of detail lines that can fit on each page, regardless of the options you have specified in the heading and total sections.

You must ensure that the top and bottom margins are large enough to completely accommodate any information you place into the header and footer areas of MS Word. The reason for this is that SYSPRO uses the top and bottom margins to calculate the amount of printing space available.

[Note]

This option is slower than the Print using a line count option, because SYSPRO has to perform calculations to determine the height of each area that is placed on the document.

Total section

This optional third section of a SYSPRO format (together with the Header section) forms part of the Non detail area of the document. For this reason, the guidelines applicable to the heading section apply equally to the total section.

The total section usually refers to the area of the document after the second continuous section break.

If the Header section break not required option is selected, then the total section is the section after the first section break.

You can optionally insert some or all of the total section into the Footer of the document. If the entire total section is placed into the footer then the Total section break not required must be selected from the MS Word Options menu.

Field Value Description
Continuation message  

If you are using a continuation message, then you should position this on its own line to ensure that it appears correctly on the document.

[Note]

The continuation message must not be placed inside a table.

No bookmarks must be placed on the same line as the continuation message.

The continuation message must not be placed in a table. (If you place the continuation message in a table, then the line containing the continuation message is not printed when the total section is printed on the last page).

During the analysis phase of the design process, the system detects whether the continuation message bookmark is in the total section.

When the document is being printed and the system detects that a new page must be inserted, it places only the line containing the continuation message before the page break. Any other bookmark placed on the same line is not populated with data.

Table Locking

Table locking is an MS Word feature that allows you to specify where you want to place a table in a document and to lock the table to that position.

SYSPRO Word printing caters for table locking, but only for a single table and only in the total section.

You would typically use table locking to ensure that the total section is always printed at the bottom of the page, regardless of the number of detail lines printed on the page.

The facility to lock tables to a position on the document is available in Word 2000. In Word 97 you can mimic this facility by placing the entire total section into the footer area of MS Word. This will, however, result in content appearing on each page of the document, regardless of the selection made against the MS Word Options.

[Note]

If a table is locked, then you can only have one table in the total section and all bookmarks (except the continuation message) must be located in the table.

General Design Advice

The following are some guidelines to assist you in creating a template:

  • Make sure that at least one carriage return is placed before and after each Section Break.

    To reduce the amount of space that is taken up by these blank lines, you can reduce the Font Size for these lines. This font size can be set to 1 or 2, even if the lowest available size in the font size list is 7. You can reduce the amount of space taken up by the Section Break line in the same way.

    You can also enter standard text in the blank lines.

  • You can only enable text wrapping in a table in the Total Section.

  • The use of multimedia objects affects how data is formatted on the page. Consider the amount of space an image will occupy, as too large an image will restrict the amount of detail that is printed on the page.

    Up to 40 multimedia objects can be used in a document.

  • The document's formatting marks can be viewed. To display formatting marks, select Options from the Tools menu in Microsoft Word and then select the required options from the View tab page.

    Displaying the document formatting marks can assist you in designing the template.

  • Defining border around tables can assist you in designing the layout of the template. You can remove these borders once you have completed the design if you do not want them to be printed around the tables on your document.

    Alternatively, you can use the Show/Hide Gridlines option from the Table menu to view the table outlines. These outlines are not printed on the final document.

  • The template must not exceed one page in length.

  • Try to keep the template design as simple as possible.

  • Save the design using the Save option from the File menu in Microsoft Word before you exit the design phase. This ensures that the design is saved even if critical errors are encountered during the analysis phase.

  • Use tables to make formatting easier. For example, if you require different formatting for static and variable text, it is easier to do this using tables.

    [Note]

    Static text is text you enter into the template.

    Variable text is the text that SYSPRO inserts in the place of bookmarks.

    When using tables, alignment rules can be applied on a cell-by-cell basis, border lines and background color can be applied, all of which can be used to highlight the data.

    Bookmarks that require different styles can be placed into different cells, without leading or trailing text.

    In some cases, both tables and tab stops might be required to achieve the desired result.

  • Enable diagnostics to assist you in troubleshooting.

Printing Word Documents

The following windows are displayed during the print process:

  • The standard tickover window is displayed by SYSPRO while the data to be printed is extracted.

    If you select the Cancel function during this process, then no further data is extracted for printing. The data already extracted will however already have been sent to the printer.

  • A tickover window is displayed by the Word formatting program. This displays the current status of the printing of Word documents.

    If you select the Cancel function during this process, the printing of all remaining documents is cancelled.

  • A window is displayed by the Word program during the print process of each document.

    If you select the Cancel function from this screen, then only the current document being printed is cancelled. The remaining batch of documents to print is not cancelled.

When documents are printed, use is made of the foreground printing option which means that each document must be completely spooled onto the printer before the next document can be created. If the printer's spooler becomes full (possibly due to the printer having run out of paper), then the system cannot created the next document until the spooler is cleared. The resulting delay may cause the system to terminate abnormally. Therefore, when you print batch documents, try to ensure that the printer's spooler does not fill up by ensuring that the printer has enough paper and ink before you begin the print process.

If you select to print a range of documents and you use the Preview facility, then only the first document in the range is displayed in the Preview window. This is due to limitations in Word.

The Word session is automatically opened and closed for each batch print, or in the case of online printing, for each document printed. However, if you use the Preview facility, you will need to close the Word session manually when printing is complete.

General WORD Printing Information

SYSPRO reformats the data extracted to print before it is sent to the print routine.

When SYSPRO extracts the data to print, the header section data is extracted first, followed by the detail section data and lastly the total section data. Word printing, however, requires access to the total section data before the detail section data so that it can place a total section on the first page of a document if required. This reformatting used to take place as part of the print process but was removed to improve run times on the client machine.

The print phase reads the information stored during the analysis phase and removes the data that is not required by the template. The template file, and attachment file if required, are copied to the temporary folder on the client machine before the print process starts. This reduces network traffic.

The print phase creates a temporary document, based on the template, to act as the source document. When faxing or emailing a document the files are created in the temporary folder. These files are deleted when emailing the document, but not if the document is being faxed. This is because the fax software, specifically WinFax PRO requires access to the document after SYSPRO performs the clean up process.

Diagnostic Codes

Diagnostic codes can be entered against the Diagnostics option (System Setup - General tab).

The following diagnostic codes can be used for Word printing:

  • WORD01

    • Does not delete any of the files created during the print phase.

      These files are:

      • The template file that was copied to the temporary folder on the client. This is only applicable in a client/server environment.
      • The attachment file that was copied to the temporary folder on the client. This is only applicable in a client/server environment.
      • The temporary file that contains the data extracted to print. This file resides in SYSPRO's temporary folder. In a client server environment this file resides in the temporary folder on the server.

        The Windows Environment Variable TEMP defines the location of this file. A typical file name for this file could be _T053004.DAT.

  • WORD02

    Creates a log file that traces the client side program execution.

    This can be useful when attempting to locate the location of an error during either print or design phase.

    Locate the file WordPlog.txt in the temporary folder on the client machine and send it to SYSPRO when logging a fault.

  • WORD03

    Creates a log file that traces the server side program execution.

    This can be useful when attempting to locate an error during either the design or print phase.

    Locate the file oper.txt in the BASE\SETTINGS directory on a Windows Server, or in the BASE directory on a Linux server.

    [Note]

    These files are created on the SERVER.

  • WORD99

    Combines the functionality of WORD01, WORD02 and WORD03.

Errors

This section describes known issues about printing using MSWord.

  • an error occurred setting the measurement unit option

    This error is specific for clients running on Office 2007. The problem relates to setting the Measurement unit when using Word printing and Office 2007.

    To resolve the problem:

    1. Select the Office option in the top left of the Word screen.

    2. Select Word Options at the bottom of the menu.

      The Word options screen displays the “Popular” options

      Make sure that the User name field is correctly defined. Entering a space in this field will cause Word printing to fail.

Print your company logo on the stationery

One of the advantages of using MS Word to format and print your stationery is that you do not need to purchase pre-printed stationery. This is made possible by the facility to insert a graphic representation of your company logo, for example, into the MS Word header.

[Note]

Do not confuse the Word header with the SYSPRO heading section.

  1. Select Header and Footer option from the MS Word View toolbar.

  2. Insert the required graphic into the header section of the Word template.

    The format of the graphic file that you can insert into the template header is limited only by whatever limitation exists within Word (i.e. If Word supports the format, it will print).

    You can also use the Watermark feature of Word to print your company logo on your stationery.

Print page numbers on the stationery

There are a number of different ways to number your stationery documents. Although the methods vary, the common factor is that you should configure page numbering within either the header or footer section of MS Word.

  1. Method 1

    1. From the MS Word View toolbar, select Header and Footer.

    2. Navigate to the Footer section of your Word template.

    3. From the Header and Footer toolbar, select the insert page number icon.

      Alternatively, from the Insert AutoText pull-down, select the - PAGE - parameter.

  2. Method 2

    1. From the MS Word Insert toolbar, select Page Numbers.

    2. From the Page Numbers window that is displayed, indicate the position at which you want to insert page numbers.

      This can be at the Top of the page (Header) or Bottom of the page (Footer).

    3. Indicate how you want to align the page number on the page (e.g. Left, right, center).

  3. Method 3

    1. From the MS Word Insert toolbar, select Field.

    2. From the Field window that is displayed, select Numbering from the Categories column.

    3. From the Field name column, select the Page field.

Lock a table

  1. Ensure that there is a carriage return before the table.

  2. Typically press the right mouse button in the table area and select Table Properties from the shortcut menu.

    Alternatively, position the mouse pointer in a table and select Table Properties from the Table pull-down menu.

  3. At the Text wrapping field select Around.

    This will enable the Positioning function.

  4. Select Positioning.

  5. From within the Table Positioning window select Bottom at the Vertical Position field.

  6. Select Margin at the Relative to field.

    [Note]

    If you do not correctly define these options, then the total section may not fit on the final page.

    If you use table locking in a section other than the total section, then a critical error message is generated during the analysis phase.

    Table locking can affect the speed at which data is populated in the total section.

    You should consider inserting the total section into the footer area of MS Word if your total section is large and/or you do not require the total section to be printed only on the last page.

    Your settings at the Distance from surrounding text or Options fields are ignored if you are printing using the entire page (i.e. these settings are used only if you are printing using the line count method).

Enable diagnostics

SYSPRO enables you to enter diagnostic codes which create log files during the design phase. These files can be used to attempt to locate errors.

  1. Navigate to the General tab of the System Setup program.

  2. At the Diagnostics field, enter one of the following diagnostic codes:

    • WORD01 if you want to keep the data files created by the print process. These files are usually deleted once the print process is complete.

      The following files are saved:

      • The template file that was copied to the temporary folder on the client. This is only applicable in a client/server environment.
      • The attachment file (if applicable) that was copied to the temporary folder on the client. This is only applicable in a client/server environment.
      • The temporary file that contains the data extracted to print.

        This file is stored in SYSPRO's temporary folder. In a client server environment this file is stored in the temporary folder on the server

    • WORD02 if you want to create a log file of the program execution that occurred on the client machine during the design process. This includes program execution during the actual design phase as well as during the analysis and validation phases.

      This log file is saved as WordDlog.txt in the temporary folder of the client machine.

    • WORD03 if you want to create a log file of the program execution that occurred on the server during the design process. This includes program execution during the actual design phase as well as during the analysis and validation phases.

      This log file is created in the Base \Settings directory on a Windows server and in the Base directory on a Unix/Linux server. The name of the file that is created is Oper.txt, where Oper is your operator code. For example, if you logged into SYSPRO as Admin, then the log file is created as Admin.txt.

    • WORD99 if you want to create both log files as well as retaining the data files created during the print phase i.e. WORD99 combines the functionality of WORD01, WORD02 and WORD03.
  3. Select Save to enable the diagnostic option you entered.

    [Note]

    You can ignore the warning given (i.e. You do not have to exit SYSPRO for this setting to take effect).