> SRS Document Printing Overview

SRS Document Printing Overview

SYSPRO enables you to define a variety of stationery formats for printing documents such as invoices, delivery notes, factory documentation, purchase orders, statements, etc.

Multiple formats can be defined against each type of document and documents can be generated using Standard document printing (normally used with pre-printed stationery), MSWord document printing and SRS document printing

The SRS Document Printing programs allow for flexible administration of SRS document formats by enabling you to:

  • Create and maintain document types and document templates.

  • Add and copy template configurations.

  • Import and export template configurations.

  • Simultaneously print a document to multiple printers.

  • Delete existing unused document template configurations.

  • Archive documents (electronic storage of documents as they are generated).

  • Retrieve (and optionally print) archived documents, including the capability of searching for historical documents.

  • Purge archived documents.

Configuring Document Printing

There are no specific installation pre-requisites for operators to use SRS document printing and archiving. However, if you want to design document templates using Crystal Reports for SYSPRO, then you need to install the Crystal Designer.

In addition, you can improve the performance of producing documents using SRS document printing by pre-loading the Crystal runtime (see Pre-loading the Crystal Runtime).

Two configuration methods are described for configuring SRS document printing. The reason is that you can either configure templates for each document type individually or you can use the SRS Document Print Setup program to configure all the templates for all document types.

Configuring SRS Document Printing for Multiple Documents

This procedure outlines the steps you need to follow to configure SRS document printing for more than one document format using the SRS Document Print Setup program. This program provides a central location from which all SRS document types and templates can be maintained.

The advantage of using this method is that you can configure document templates for all your document types at the same time. Thereafter, you link each template to the relevant document type format in each Stationery Format program.

  1. Optionally configure SRS document archiving.

    This is only required if you want to archive your documents.

    See Configuring Document Archiving.

  2. Attach a template to the document type.

    [Note]

    This procedure assumes that you are using the Sample templates provided by SYSPRO for each document type. You can, however, also design your own templates.

    1. From the SRS Document Print Setup program SYSPRO Main Menu->Utilities->SRS Document Setup), highlight the document type for which you want to configure an SRS document template.

    2. Select the Add icon from the Templates pane.

      The Add SRS Document Template program is displayed.

    3. At the Template description field, enter a descriptive name for the template.

    4. At the Template field, select the Browse icon.

      The available templates are displayed in a listview.

    5. Double click on the Sample template.

      This is a pre-designed template which you can modify later using the Design function of the SRS Document Print Setup program.

      The Blank Sample template is a blank template which you use to design your own template.

    6. Select Save and Close.

      The SRS Document Template program is displayed, enabling you to configure the template.

  3. Configure the attached template for the document type.

    1. Using the SRS Document Template program, select the options you require.

    2. Optionally select the Add Printer function from the Printers pane to add a default printer to use each time the document is printed using this template. You can also indicate the number of copies to print when printing the document using this template.

      [Note]

      If you do not define any printers against the document template, then the {Current printer} is used by default.

      The {Current printer} defaults to one of the following:

      • the current SYSPRO printer
      • the default printer assigned to the program
      • the default printer destination for the specific document (e.g. Document Print - Printer Preferences)

        If none of these is defined, then the Print dialog screen for your operating system is displayed, enabling you to indicate the printer to use.

    3. Select the Design function from the SRS Document Print Setup program to modify the document template using Crystal Reports for SYSPRO.

      This is required because the sample templates have The Outdoors Company logo embedded in them, which you need to replace with your own company logo.

      [Note]

      The Crystal Designer only needs to be installed on the client workstations where operators will design document templates using Crystal Reports for SYSPRO.

      Save your changes and Close the Crystal Designer.

    4. From the SRS Document Template program, select Save and Close to return to the SRS Document Print Setup program.

  4. For each document type you want to generate using SRS document printing:

    1. Attach a template to the document type.

    2. Configure the attached template for the document type.

  5. Link the template to the document format.

    After you created the templates and defined the template configurations for each document type, you must link the document template configuration to the specific document type's format.

    For each document type:

    1. Navigate to the Stationery Format program for the document type (SYSPRO Main Menu->Setup->Stationery Formats).

      The document format setup window for the selected document type is displayed.

    2. Select the Document type.

    3. Select the Format.

      [Note]

      You can either:

      • select your existing document format to convert to SRS document printing.

      • keep your existing format and create a totally new format for SRS document printing.

      • keep your existing format and copy it to a new format for SRS document printing.

    4. At the Print method field, select SRS document as the print method.

    5. Double-click on SRS Options in the Format options pane.

      • If more than one template is defined for the document type, then the SRS Document Printing Formats window is displayed.

        1. Double click on the template you want to use for the document type format. The SRS Document Template program is displayed.

      • If only one template is defined for the document type, then that template is automatically selected and the SRS Document Template program is displayed.

        The options you previously configured for the template are displayed.

    6. Close the SRS Document Template program.

    7. Close the SRS Document Print Setup program.

    8. Define the preferences and other print options in the same way as you would when you are using standard document printing and MS Word printing.

      Some of the preferences and print options only apply to SRS document printing.

      Refer to the online help against the specific stationery format program for further information.

    9. From the document format setup window select the Save function.

  6. Configure security for SRS document printing.

    Refer to Security.

  7. Inform your operators which document formats to use for printing documents using SRS document printing.

Configuring SRS Document Printing for Individual Documents

This procedure outlines the steps you need to follow to configure SRS document printing for each document format individually.

The advantage of using this method is that you can configure the document template and link it to the document format simultaneously from within each of the Stationery Format programs.

  1. Optionally configure SRS document archiving.

    This is only required if you want to archive your documents.

    See Configuring Document Archiving.

  2. Attach and link a template to the document type.

    [Note]

    This procedure assumes that you are using the Sample templates provided by SYSPRO for each document type. You can, however, also design your own templates.

    1. Navigate to the Stationery Format program for the document type (SYSPRO Main Menu->Setup->Stationery Formats).

      The document format setup window for the selected document type is displayed.

    2. Select the Document type.

    3. Optionally enter a new description for the document format.

    4. Select the Format.

      [Note]

      You can either:

      • select your existing document format to convert to SRS document printing.

      • keep your existing format and create a totally new format for SRS document printing.

      • keep your existing format and copy it to a new format for SRS document printing.

    5. At the Print method field, select SRS document as the print method.

    6. Double-click on SRS Options in the Format options pane.

      The SRS Document Print Setup program is displayed

    7. Select the Add icon.

      The Add SRS Document Template program is displayed.

    8. At the Template description field, enter a descriptive name for the template.

    9. At the Template field, select the Browse icon.

      The available templates are displayed in a listview.

    10. Double click on the Sample template.

      This is a pre-designed template which you can use as is, or modify later using the Design function of the SRS Document Print Setup program.

      The Blank Sample template is a blank template which you use to design your own template.

    11. Select Save and Close.

      The SRS Document Template program is displayed, enabling you to configure the template.

  3. Configure the attached template.

    1. Using the SRS Document Template program, select the options you require.

    2. Optionally select the Add Printer function from the Printers pane to add a default printer to use each time the document is printed using this template. You can also indicate the number of copies to print when printing the document using this template.

      [Note]

      If you do not define any printers against the document template, then the {Current printer} is used by default.

      The {Current printer} defaults to one of the following:

      • the current SYSPRO printer
      • the default printer assigned to the program
      • the default printer destination for the specific document (e.g. Document Print - Printer Preferences)

        If none of these is defined, then the Print dialog screen for your operating system is displayed, enabling you to indicate the printer to use.

    3. Select Save and Close to return to the SRS Document Print Setup program

    4. Select the Design function from the SRS Document Print Setup program to modify the document template using Crystal Reports for SYSPRO.

      This is required because the sample templates have The Outdoors Company logo embedded in them, which you need to replace with your own company logo.

      [Note]

      The Crystal Designer only needs to be installed on the client workstations where operators will design document templates using Crystal Reports for SYSPRO.

      Save your changes and Close the Crystal Designer.

    5. Close the SRS Document Print Setup program.

      The document format setup window is displayed.

    6. Define the preferences and other print options in the same way as you would if you were using standard document printing and MS Word printing.

      Some of the preferences and print options only apply to SRS document printing.

      Refer to the online help against the specific stationery format program for further information.

    7. From the document format setup window select the Save function.

  4. For each Stationery Format you want to generate using SRS document printing:

    1. Attach and link a template.

    2. Configure the attached template.

  5. Configure security for SRS document printing.

    Refer to Security.

  6. Inform your operators which document formats to use for printing documents using SRS document printing.

Configuring Document Archiving

This procedure outlines the steps you need to follow to configure the archiving of documents generated using SRS document printing.

  1. Use the SRS Document Archive Setup program to:

    • optionally change the standard archive root folder to a user-defined archive root folder if you do not want to use the pre-defined standard archive root folder using the program.

    • configure the settings for purging archived documents

  2. Define the archive fields you require for each document type, using the SRS Document Types program.

    Every document type has mandatory archive fields that are selected by default. These fields cannot be removed. You can, however, optionally select to add more archive fields.

  3. Save each document type in the SRS Document Types program.

    When you select the Save and Close option in the SRS Document Types program, the details of the document type are saved in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file. If there is no entry for a document type in this control file, then documents are not archived.

    In a SQL environment, when you select the Save and Close option in the SRS Document Types program, the program creates the SRS archive control table for the document type in all the valid SQL databases in your environment.

  4. Use the SRS Document Template program to configure the archiving options against the document template(s) for each document type.

    This enables you to selectively indicate which document templates you want to archive for each document type and to specify the file formats in which you want to archive documents generated using that specific template.

    Documents generated using the template are only archived once these options are configured against the template.

  5. Configure security for SRS document archiving.

    Refer to Security.

Configuring Printing, Emailing and Faxing

The following is a summary of the implementation steps you need to follow to print/email/fax SRS documents:

  1. Define the program access for the SRS document printing programs (see Security).

  2. Add templates to the document types using the Add SRS Document Template program.

  3. Define the template configurations using the SRS Document Template program.

  4. Design the document templates using Crystal Reports for SYSPRO.

    You use the Design function from the SRS Document Print Setup program to modify the document template using Crystal Reports for SYSPRO.

    [Note]

    The Crystal Designer only needs to be installed on the client workstations where operators will design document templates using Crystal Reports for SYSPRO.

  5. Link the template configurations to specific document formats, using one of the stationery format setup programs (e.g. the S/O Document Formats program).

  6. The documents can now be printed/emailed or faxed according to the options selected in the document printing programs (e.g. in the Document Print program).

    [Note]

    The option Fax/Mail integration required must be selected against the operator code in order for the documents to be faxed/emailed (Operator Maintenance).

Pre-loading the Crystal Runtime

When SYSPRO loads the Main Menu it can automatically pre-load the Crystal runtime, which substantially reduces the time taken to create SRS document printing documents.

This is not done by default, because pre-loading the Crystal runtime consumes more memory and is therefore an unnecessary overhead for operators who never intend using SRS document printing.

Note that pre-loading the Crystal runtime does not increase the time taken to load SYSPRO; it simply increases the amount of memory consumed by SYSPRO at startup.

You can automatically pre-load the Crystal runtime for all operators as follows:

  1. From the SYSPRO Ribbon Bar, select Administration - Customization - System-wide Personalization.

  2. From the System-wide Personalization program, set the option: Optimize by pre-loading Crystal runtime to Optimize for all operators

Alternatively, you can allow each individual operator to pre-load the Crystal runtime as required. This is useful if you want only those operators who use SRS document printing to benefit from the optimization.

  1. From the SYSPRO Ribbon Bar, select Administration - Customization - System-wide Personalization.

  2. From the System-wide Personalization program, set the option: Optimize by pre-loading Crystal runtime to Set at operator level.

  3. Individual operators can now pre-load the Crystal runtime as follows:

    1. From SYSPRO's Main Menu, select Personalize from the Options menu.

    2. From the Printing tab of the Customize screen, select the option: Optimize document printing by pre-loading the Crystal runtime as SYSPRO loads.

Security

Security for SRS Document Printing and Archiving can be defined at operator, operator group and operator role levels.

Refer to the SYSPRO Security Introduction document for additional information.

Operator Security

If you want to use document archiving, then operators need access to the individual archiving operator activities.

These activities are listed under the Module: SYSPRO Document Services section of the Operator Maintenance program (see Security Activities).

Group Security

Operators responsible for designing and maintaining SRS document templates need to belong to an operator Group that has access to the relevant programs for SRS Document printing.

You define Group access to the following programs (see Operator Group Maintenance - Module: Reporting Services section) as required:

[Note]

Operators must also have access to the individual Stationery format programs (for example S/O Document Formats, Factory Documentation Format, etc) to link an SRS template to a specific document format.

Program Code Description Required for:
SRSP01 SRS Document Archive Setup Archiving only.
SRSP02 Add SRS Document Template

Printing, Emailing, Faxing and Archiving.

SRSPAP SRS Document Archive Purge Archiving only.
SRSPB1 SRS Document Print Setup Printing, Emailing, Faxing and Archiving.
SRSPB2 SRS Document Pending Archive Archiving only - SYSPRO administrator function.
SRSPM1 SRS Document Types

Archiving only.

There is a document archive viewer program per document type.

Developers also need access to this program if they need to add a new document type or customize an existing document type.

SRSPM2 SRS Document Template Printing, Emailing, Faxing and Archiving.
SRSPV1-9 and SRSPVA-W Archive Viewers Printing, Emailing, Faxing and Archiving.
IMPSLG SQL Administration Login Archiving and maintaining document types (SQL only).

Role Based Security

Access to SDS activities and individual SRS document printing and archiving programs can be configured by role.

You use the Role Management program to define. You use the Role Activities and Fields Maintenance and Role Program Access Maintenance programs to indicate the activities and programs to which operators for a specific role have access.

Architecture

SRS document printing uses Crystal Reports.

When using SRS document printing, the document format is linked to an SRS document template configuration.

You use the document printing programs within each module of SYSPRO to print documents using a specified document format

Processing of SRS document printing is server-driven and the archiving process is client-based.

[Note]

SRS document printing does not use any of the business objects developed for SRS reporting.

These two technologies both use Crystal Reports to design reports or documents, but they use different programs and processes.

Files used by SRS Document Printing Programs

SRS document printing uses the following control files, folders, and data files/tables:

[Note]

These folders and files are all saved on the SYSPRO application server.

Full path and file name/Table name Explanation

..\Base\ReportingServices\DocumentControl\ Documentcontrol.xml

This file is not used in the current version of SRS document printing.

..\Base\ReportingServices\ DocumentControl\Documentsamples.xml

This file contains all the standard document types and the template names/descriptions of the sample document templates, displayed in the Samples pane, which are linked to each document type.

If you copy a template based on a sample template, and you browse for sample templates, then the samples linked to the document type in this file are displayed.

[Note]

This file should not be edited or deleted.

..\Base\ReportingServices\DocumentSamples

The document template samples, supplied by SYSPRO, are saved in this folder.

Two sample templates are supplied for each standard SYSPRO document type:

  • sample_blank_*.rpt: This is a blank template which you use to design your own template.

  • sample_*.rpt: This is a pre-designed template which you can use as is, or modify using the Design function.

[Note]

All the standard document types have two sample templates, except for the Invoice document type which has three sample templates linked to it.

..\Base\ReportingServices\DocumentTemplate

This folder is not used by the current version of SRS document printing.

If this folder exists on a client workstation, the folder and the contents can be removed. The folder should not be removed from the application server, although SYSPRO do not currently ship any files that will be copied to this folder.

..\Base\ReportingServices\ ReportMenu\Documentmenu.xml

This file contains all the standard document types that are displayed in the SRS Document Print Setup program. It also contains the names of the schema file (.xsd) and the XML file linked to each document type.

[Note]

This file should not be edited or deleted.

..\Base\ReportingCustomized\ DocumentControl\Documents.xml

This file contains the document template configurations for the template files that exist in the ..\Base\ReportingCustomized\DocumentTemplate folder. This file is only created once you have added at least one template configuration for any document type.

The information saved in this file includes:

  • Document id

  • Template name

  • Print options

  • Email options (maximum attachments, group emails, number of attachments)

  • Archive options (If archiving is required and the archive formats required)

  • Fax options

  • Printer details

  • Operator details

  • Date and time details.

..\Base\ReportingCustomized\DocumentTemplate

This folder is empty by default. As you add document template configurations to document types, the template files (*.rpt) are created in this folder.

If you copy from an existing template or select to use an existing template, then the contents of this folder are displayed when you browse for an existing template file.

..\Base\ReportingCustomized\ ReportMenu\Documentmenu.xml

This file is only created once you have saved a document type (with selected archive fields). You use the SRS Document Types program to save document types. You need to save each document type with selected archive fields before documents for that document type can be archived.

The information saved in this file includes:

  • Document menu id

  • Description and name

  • Module id and description

  • The schema file name (.xsd) and the XML file name linked to the document type

  • All the selected archive field names and details (including table names, column names, field sizes).

The selected archive fields per document type, defined in this file, are used in the file/table definition of the archive control files/tables. The SRS Document Types and the Document Archive Viewer programs use this control file when they validate the existence of the archive control table (SQL) and the validity of the columns of the archive control file/table.

Whenever you save a document type, this entire file is rewritten to disk and not just the details for the document type you are editing. This will cause a resource lock on the file if more than one operator attempts to save document types at the same time.

[Note]

If this file does not exist or if the entry for the specific document type does not exist, then you have not saved the document type with selected archive fields yet.

This results in no documents being archived for the document type.

..\Base\Schemas

All the XML and XSD files designed for SRS document printing are saved in this folder. You use these files to define the data source of the document template within Crystal Reports.

The file names for these files are in the format sample_documenttype.xml and sample_documenttype.xsd, for example sample_so_acknowledgement_document.xml and sample_so_acknowledgement_document.xsd.

[Note]

These files are supplied by SYSPRO and updated by the SYSPRO Software Upgrade program whenever updates are available.

..\Programs\IMPSRA.IMP

This is a cross-reference file between document types and unique codes used to create SRS archiving files or tables.

The unique code is 3 characters long:

  • CISAM file names are ?SRS***.DAT/IDX, where ? is the SYSPRO company code and *** is the unique code.

  • SQL table names are SrsArchive***, where *** is the unique code. When the SQL archiving tables are created, they are created in all the valid SQL databases that exist in the SYSPRO installation.

A new document type must exist in this file before you can add it using the SRS Document Types program. The standard document types have already been added to this file by SYSPRO.

[Warning]

Changing existing unique codes after archiving has been done will result in the loss of all previously archive records.

..\Data\?SRS***.dat/idx

These files are the CISAM archiving control files that store the details of the archived documents for the specific document type.

These files do not exist by default.

The data columns of each archive control file are determined by the selected archive fields saved against the document type in the ..\Base\ReportingCustomized\ ReportMenu\Documentmenu.xml control file.

[Note]

These files only exist if your database is in CISAM format.

You need to save each document type with selected archive fields before documents for that document type can be archived.

The archive control files in a CISAM company are only created when the archiving process actually inserts a record into the archive file for the first time.

The program uses the IMPSRA.IMP file to determine the code (***) to be used, per document type, to build up the file names. Examples of archive control files are:

Invoices ..\Data\0SRSINV.DAT/IDX

Order Acknowledgement ..\Data\0SRSACK.DAT/IDX

Quotation - single ..\Data\0SRSQTS.DAT/IDX

The company id used in these examples is 0.

DatabaseName.SRS*** table

These tables are the SQL archiving control tables that store the details of the archived documents for the specific document type.

The SQL database tables do not exist by default.

The data columns of each archive control table are determined by the selected archive fields saved against the document type in the ..\Base\ReportingCustomized\ ReportMenu\Documentmenu.xml control file.

[Note]

These tables only exist if your database is in SQL format.

You need to save each document type with selected archive fields before documents for that document type can be archived.

When the SRS Document Types program is opened, it validates that:

  1. the specific document type's archive control table exists on all SQL databases for all companies (It only checks the SQL databases that have matching ?ADMCTL.* company control files in the ..\Work folder.)

  2. all the mandatory columns are present in the table.

  3. all the user-selected archive fields are present in the table.

  4. the type and size of each column already on the table matches the type and size of the specified column in the schema file (.xsd) for the document type.

The program returns a warning message Invalid or missing archive control table with the list of SQL databases where the specific control table is missing. You have the option to correct the archive control tables in the SQL databases.

[Note]

When you select the option to correct the missing archive control table, then the archive control table for the specific document type is created in all the valid SQL databases.

The program uses the IMPSRA.IMP file to determine the code (***) to be used, per document type, to build up the table names.

Examples of archive control tables are:

Invoices: SysproOutdoors0 and SrsArchiveINV

Order acknowledgement: SysproOutdoors0 and SrsArchiveACK

Quotation - single: SysproOutdoors0 and SrsArchiveQTS

The SQL database name used in these examples is SysproOutdoors0.

..\Work\?ADMSDL

This is the Pending Archive Control file and is used to control all the pending document batches. The contents of this file are displayed in the SRS Document Pending Archive program.

The information saved in this file includes:

  • The full path name to the pending GUID folder

  • Operator information

  • Date and time information

  • Template name

  • Schema name

  • Document type

  • Archive type (PDF, RPT or both)

  • Details regarding the operator locking the archive process.

[Note]

This file is created for each company and has the company id as a prefix in the file name.

This file is always in CISAM format and you can use the Reindex Data Files program to re-index the file.

..\Work\?ADMSRD

This file is used to keep track of temporary folders used by SRS document printing which could not be deleted when the printing and archiving processes were completed. The information saved in this file includes:

  • Date and time information.

  • Temporary folder path of the client workstation, including the operator code and the GUID folder name.

[Note]

This file is created for each company and has the company id as a prefix in the file name.

This file is always in CISAM format and you can use the Reindex Data Files program to re-index the file.

..\Work\srs_?\document_type\ year\month_number

This is the pre-defined standard archive root folder where archived documents are copied to from the client workstation.

You can change this folder using the SRS Document Archive Setup program.

The different document types are used within the folder structure. A new folder per company is created by default.

Examples of document folder structures (if you are using Company H in SYSPRO) are:

  • ..\Work\srs_H\invoice\2011\10

  • ..\Work\srs_H\stock_receipts\2011\11

  • ..\Work\srs_H\quotation_-_single\2011\12

The file names of the archived documents consist of the client workstation name (where the archive document was created), the SYSPRO operator code, the date and the time.

Examples of archived documents are:

  • BrianMachine_ADMIN_20111018_14072652.pdf

  • CathyMachine_JOE_20111018_14072652.rp

..\Work\srs_?\pending\ {GUID}

The pending folder is created within the archive root folder and is used in the archiving process.

Within this pending folder, a GUID subfolder is created per archiving session. The document printing program first copies a document batch to this GUID subfolder and then, as documents are successfully archived, the files are removed from the GUID subfolder. See The Archiving Process.

An example of a pending folder is ..\Work\srs_0\pending\{8f628032-5bac-4303-a99c-dbd101e499b2}

Within this folder you will find a document batch, that consists of:

  • An XML file for each document created. This file contains the actual data.

  • The template file.

  • The sample XSD file for the document type.

..\Base\Settings \archive_error_OPERATOR_date_time.txt

When archiving errors occur, the program creates an error log file within this folder.

The file name of the log file contains the operator code, the date and time. The SRS Document Pending Archive program displays the name of this error file against the relevant pending document batches.

An example of an error log file is archive_error_ADMIN_20111017_09122637.txt

..\Work\ADMSYS.dat

This is the Admin System Control file, which is used to save various settings in SYSPRO.

Some of the information saved relating to SRS document printing includes:

SRS Document Printing Process

Following is a summary of what happens when you process a document using SRS document printing:

  1. You open one of the document printing programs in SYSPRO and select to print/reprint a single document (or a batch of documents) using a document format linked to an SRS document template configuration.

  2. The standard document printing program passes the document type (e.g. Statement), the document id and the XML (containing the actual data related to the document) to the SRS Documents Printing program (SRSPRT).

  3. The SRS Documents Printing program calls the SRS Document Printing Routines program (SRSP99).

  4. The SRS Document Printing Routines program loads the contents of the following control files (saved on the SYSPRO application server) into memory:

    • ..\Base\ReportingServices\ReportMenu\Documentmenu.xml

    • ..\Base\ReportingServices\DocumentControl\Documentsamples.xml

    • ..\Base\ReportingCustomized\DocumentControl\Documents.xml

    • ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml

    • All the XSD files for each document type (..\Base\Schemas)

    [Note]

    The program loads these files once into memory and the information is available for the rest of the SYSPRO session.

    These files are only re-loaded into memory when their contents change during the current SYSPRO session.

  5. The SRS Documents Printing program determines if archiving is enabled by checking:

    1. whether the control file ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml exists. If so, it checks for an entry for the specific document type in this file.

      When you maintain the document type for the first time and you select to save the file, then an entry for the document type is created in this file.

    2. whether the Archive document option is selected in the document template configuration.

      This configuration is saved in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file.

    [Note]

    The archiving process will only start on the client workstation if both these conditions are met.

  6. The SRS Documents Printing program copies the following files from the SYSPRO application server to the temporary folder on the client workstation (..\Temp\Operator\GUID):

    • The XML files containing the actual data relating to the document(s) to be printed.

    • The XSD schema file relating to the document type(s) to be printed.

    • The RPT template file to be used for creating the document(s).

  7. The SRS Documents Printing program calls the SRS Documents Printing user control [programs (..\Base\Bin) on the client workstation which passes the information to the managed assembly SYSPROMA_DocumentPrimnting.dll.

  8. The managed assembly binds the XML data files to the template and creates the documents in the temporary folder on the client workstation. The document type and document number are used in the document file name, for example Invoice_100527.rpt

  9. The managed assembly handles the printing, emailing or faxing of the documents according to the template configurations.

  10. The documents are displayed in the SRS Preview window on the client workstation.

    The Print Preview screen is displayed for all SRS documents when printed from a program regardless of whether printing online or in batch mode when the option: Document Preview is enabled (Setup - Printing) and the program from which the print is generated does not explicitly instruct the SRS print program (SRSPRT) not to preview.

  11. If archiving was not enabled (which was determined in step 5), then the programs exit. If archiving was enabled, the archive process starts on the client workstation. (See The Archiving Process.

  12. When printing and archiving are completed, then the temporary folder on the client workstation is removed, provided that none of the files in the folder is locked.

Archiving

A useful feature of SRS document printing is the ability to archive (save) previously generated SRS documents. This enables you to keep a copy of the original document on file, which you can reprint, re-email and re-fax as required.

Once you have configured document archiving (see Configuring Document Archiving), documents can be printed/emailed or faxed according to the options selected in the document printing programs (e.g. Document Print, Purchase Order Print, Statement Print programs).

When printing/emailing/faxing is finished, the archiving program is automatically launched on the client workstation and the documents are archived.

You can maintain the pending document batches not yet archived, using the SRS Document Pending Archive program. You need to unlock these document batches and then either archive or delete them. Note that this is a system administrator's function.

In addition, you can view/print/email archived documents using the various Document Archive Viewer programs.

Archived documents can be purged using the SRS Document Archive Purge program. This program deletes the selected documents which are older than the number of months/years indicated at run time of this program. This defaults to the number of months/years defined in the SRS Document Archive Setup program.

The Archiving Process

When you generate SRS documents and archiving is required for the document template, the following occurs:

  1. The SRS Document Printing program creates a GUID folder within the ..\Work\srs_?\pending\ folder on the SYSPRO application server (? = company id).

    [Note]

    The program creates a pending folder within the pre-defined standard archive root folder or the user-defined archive root folder (SYSPRO Main Menu->Setup->Stationery Formats->SRS Document Archive).

  2. The SRS Document Printing program copies the document batch to this GUID folder.

    A document batch consists of multiple XML files (one per document), the template file and the schema file.

  3. The SRS Document Printing program adds a record to the pending archive control file (..\Work\ADMSDL). See Files used by SRS Document Printing Programs.

    A different entry for each batch is created in this file.

  4. The SRS Document Printing program calls the program SYSPRODocumentArchiving.exe (..\Base) on the client workstation. This opens a SYSPRODocumentArchiving.exe process in Windows Task Manager.

    [Note]

    A SYSPRO SRS Document Archiving process window is displayed on the client workstation. This window is minimized by default.

  5. The SYSPRODocumentArchiving.exe program calls the COMQSR business object which reads the pending archive control file and returns a list of XML data files for a single batch, contained in the ..\Work\srs_?\pending\GUID folder, on the application server.

  6. For each XML file (the program loops through them):

    1. The COMQSR business object copies the XML file to the ..\Temp\Operator\GUID folder on the client workstation. It also copies the schema file (XSD) and the template file (RPT) to the same folder on the client workstation.

    2. The SYSPRODocumentArchiving.exe program generates the required documents (either in PDF, RPT or both formats) in the ..\Temp\Operator\GUID folder on the client workstation.

    3. The COMTSR business object copies the archive documents to the ..\Work\srs_?\document_type\year\month_number folder on the application server (see Files used by SRS Document Printing Programs).

    4. The client application (SYSPRODocumentArchiving.exe) removes the archive documents and the XML file from the client workstation.

    5. The COMTSR business object updates the SRS archive control file/table with the details (data for the selected archive fields) of the archive documents.

    6. The COMTSR business object removes the XML data file from the ..\Work\srs_?\pending\GUID folder on the application server.

    The number of times the program continues with this loop depends on the number of XML files (number of documents) in the ..\Work\srs_?\pending\ folder on the SYSPRO application server.

  7. Once all the XML files have been removed from the application server, the ..\Work\srs_?\pending\GUID folder is deleted.

  8. The COMTSR business object deletes the batch entry from the pending archive control file.

[Note]
  1. The two business objects developed for the archiving process are:

    • COMQSR : COM Retrieve SRS Files from Server

    • COMTSR: Store SRS Archive Files on Server.

  2. Documents are archived when they are initially generated (printed, faxed or emailed) and each time they are re-generated (i.e. re-printed, re-emailed or re-faxed) from within the various document printing programs in SYSPRO.

    Documents are not re-archived when you print them from within the various Document Archive Viewer programs.

  3. SRS document archiving is a client-side process.

  4. When any errors are detected during this process, the archiving of the batch stops and the document batch is locked.

    Details of the errors found are written to the archive_error_operator_date_time.txt file in the ..\Base\Settings folder on the application server.

Document Pending Archive

As documents are printed, the following are copied to the ..\Work\srs_?\pending\ folder (archive root folder) on the SYSPRO application server:

  • the XML files per document

  • the document type schema file

  • the document template file

This happens before the archiving process on the client workstation generates the archive documents.

As the archiving process progresses, the XML data files per document are removed from this pending folder.

If the SYSPRODocumentArchiving.exe program on the client workstation cannot complete archiving of a document batch, then the XML data files for the documents not yet archived still exist in the pending folder. There is also an entry in the pending archive control file for the document batch. The details of the operator who initiated the archive process are written to this entry as it is locked by this operator (see Files used by SRS Document Printing Programs).

Possible reasons for an incomplete archiving process include:

  • the client workstation being shut down before the archiving process is complete.

    When an operator attempts to shut down the workstation whilst archiving is in process, a prompt to either stop the archiving process or cancel the system shutdown is displayed.

    If the operator selects to stop the archiving process, the system continues to archive the document currently being archived and then only stops archiving. A message to indicate that archiving has halted is displayed.

    If the operator selects to cancel the shut down, then archiving continues.

    If, however, the operator merely switches the workstation off, then an incomplete archiving process can occur.

  • a power failure or network communication failure.

  • the document archive root folder not being accessible (see SRS Document Archive Setup).

  • disk space errors.

  • missing columns in the archive control table.

You use the SRS Document Pending Archive program (SYSPRO Main Menu->Utilities->SRS Document Setup->SRS Document Pending Archive) to view and optionally archive all the pending document batches.

[Note]
  • The SRS Document Pending Archive program is intended as a SYSPRO administrator function and not as a general use function. You should limit access to this program (see Security).

  • The information displayed in the SRS Document Pending Archive program is company-specific.

  • You cannot save any changes to a document type if there are any existing entries for this document type in the pending archive control file. You need to use the SRS Document Pending Archive program to either archive or delete the pending entries for this document type before you can save your changes in the SRS Document Types program.

Pending document batches exist because the archiving program could not successfully complete the document archiving process on a client workstation or a batch may be in active archiving process on a client workstation.

Once archived, you can use one of the Document Archive Viewer programs (see Document Archive Viewer) to view the archived documents.

If an archiving error file exists for the pending document batch in the ..\Base\Settings folder, then the contents of this error file is displayed in the Notepad pane of the SRS Document Pending Archive window. This may give you an indication of why the archiving process of the batch did not complete successfully or why the document batch is in a locked state. Although you can type notes in the Notepad pane, you cannot save user-defined notes against the pending document batch.

You can perform any of the following actions using the SRS Document Pending Archive program:

Action Details

Unlock/Unlock All

Before any of the pending documents can be archived, you need to unlock the document batch.

There may be only one or more than one documents within the batch.

If the error that initially caused the problem has been corrected, then the document batch is unlocked.

[Note]

Before you select to unlock the document batch, you need to determine the cause of the lock state.

The document batch may be locked because it is currently being archived, or an error may have occurred while the archiving process was running on a client workstation.

If you unlock a batch which is currently being archived and you select to archive the batch, this may result in duplicate archive entries.

You should therefore take care when unlocking locked batches.

Archive now

You can select to archive pending document batches.

All the unlocked pending document batches are archived.

If any errors occur, the batch is locked again.

When you select the Archive now option:

  1. the document batch, currently being archived, is locked.

    It may be possible for another operator to unlock or delete the batch while the batch is currently being archived. If this happens, it may result in duplicate or missing archived documents.

    It is therefore important to note that the SRS Document Pending Archive program must be secured (see Security.

  2. a SYSPRO SRS Document Archiving process window is displayed on the client workstation.

    This window is minimized to the Windows Task Bar so as to not be intrusive. The purpose of the window is to inform the operator that the client archiving process is running, so that the operator does not shut the client workstation down while the archiving process is still running.

    If the operator continues to shut the workstation down before the archiving process is completed, then the server side control files could be left in a locked state. You can select to stop the archiving process before you shut down the client workstation to ensure that the server side control files are left in the correct state (SRS Document Pending Archive - File > Stop Archive Process).

    [Note]
    • When you select to stop the archive process, the program creates a file in the client workstation's ..\Base\Settings folder to pass a shutdown instruction to the client archiving process. The file name is OPER_SRSDoc_ArchiveCommand.txt and is deleted by the archiving process once it has been read.

    • You can only stop the archiving process if the archive process is running on your client workstation. You cannot stop archiving processes that are running on other client workstations.

Delete/Delete All

You can select to delete batches. This deletes document batches in both locked and unlocked states.

When you select to delete a batch:

  • the GUID folder and its contents are removed from within the pending folder on the application server.

  • The batch entry is removed from the pending archive control file and the entry is therefore not visible in the SRS Document Pending Archive window anymore.

[Note]

You can delete a currently active archiving process (even when it is in a locked state).

The Delete All option removes all the document batches as the program cannot check to see if the locks are still valid. The program cannot poll all the client workstations to determine if any of the archive processes are still running or not.

You should therefore take care when deleting locked batches.

Document Archive Viewers

Once documents are archived, you can use the different Document Archive Viewer programs per document type (SYSPRO Main Menu->SYSPRO Reporting Services->Document Archive Viewers).

[Note]

These programs can be secured using operator group security (see Security).

The Document Archive Viewer programs can also be opened from within various other SYSPRO programs.

The smart link technology available from SYSPRO listviews and display forms allows you to drill directly into archived documents from the appropriate key fields.

[Note]

You use the SRS Document Types program to indicate the key fields to use as archive fields for a document type.

For example:

When you use the Customer Query program and viewing the Invoices tab, you can hover the mouse pointer over one of the invoice cells and access the smart link that appears. You can then select Archived Invoices to invoke the document archive viewer for the document type Invoices to display the archived documents for the selected invoice number (the invoice number is pre-selected in the Selected Archived Fields pane as the custom filter). From the viewer you can make further selections to refine the documents shown and print/email the document as required.

Similarly, if you use the smart link from a Customer account number, it allows you to view Archived Statements and Archived Invoices for that customer. If you require the smart link on the customer code to be able to view the archived invoices for a specific customer, then you should ensure that the Customer Code field is selected as an archive field against the document type Invoices (otherwise all invoices for all customers are displayed). You use the SRS Document Types program to indicate the key fields to use as archive fields for a document type.

[Note]

The archive viewer may take a few seconds to load while it locates the appropriate item from its archive.

In an SQL environment, if the archive control table for the specific document type has not yet been created (or the columns of the archive control table are invalid), then you receive an error message Invalid or missing archive control table when you try to open the Document Archive Viewer program for the specific document type. In order to correct this, you need to maintain the document type (using the SRS Document Types program) and select the Save and Close option. This creates the archive control table or corrects the columns (according to the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file) of the archive control table in all valid SQL databases.

[Note]

You only receive this error message when your company is an SQL company. The program checks the existence of the SRS archive control for the specific document type across all existing SQL databases.

In a CISAM environment the archive control files are only created when the archiving process actually inserts a record into the archive file for the first time.

See also:

The data of the SRS archive control file/table is displayed in the Archived Documents pane. The listview in this pane is dynamically built every time you open the program, based on the contents of the archive control per document type (..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml).

[Note]

The SRS Document Archive Viewer window is not customizable. You can customize the listview and the panes, but the customization is not retained when you close this window.

You can either search for the documents using a time filter or a custom filter.

The Time Filter at the top of the window defaults to Today to minimize the potential number of archived documents shown when you first load the viewer. The selected time filter is saved and shown as the default the next time you load the viewer. These settings are saved, per operator code and Document Archive Viewer program, in the ..\Work\ADMSYS.dat (the Admin System Control) file on the application server.

The Custom Filter function consists of standard filter fields and the selected archive fields. You can use any of the following standard filter fields:

  1. Operator

  2. Start Date

  3. End Date.

The selected archive fields consist of the fields you assigned to the document type, using the SRS Document Types program. If you changed the selected archive fields, then the documents already archived are not changed to include/exclude your new selection. This will result in blank or {none} data entries displayed in those columns in the Document Archive Viewer programs.

If you search on selected archive fields, you need to note that blank or {none} data entries have an effect on the search results displayed in the Archived Documents pane. The selected archive fields include the mandatory fields as well as optional archive fields you may have selected (see Selected archive fields per document type).

If your company is an SQL company and you enter a part of a string, then the Custom Filter function searches for that string within the field. In a CISAM company, you need to enter the exact string that you want to search for.

Once you have found the archive documents you were searching for, you can select the Preview hyperlink. This opens the documents (in PDF, RPT or both) formats in an SRS Preview window. The functions available depends on the document format you are viewing as well as on the operator activities selected against your operator code (Operator Maintenance - Security tab). Documents can be printed, exported/saved or emailed from within this SRS Preview window.

By default, only the documents you generated are displayed. However, all archived documents are displayed if the activity SDS View all archived items is selected for your operator code (Operator Maintenance - Security tab).

In addition, if your operator code belongs to a role, then all documents generated by the other operators in your role are displayed if the activity SDS View operator role archived items is selected for your operator code (Operator Maintenance - Security tab).

[Note]

Documents are archived when they are initially generated (printed, faxed or emailed) and each time they are re-generated (i.e. re-printed, re-emailed or re-faxed) from within the various document printing programs in SYSPRO.

Documents are not re-archived when you print them from within the Document Archive Viewer programs.

Archive purge

You can purge selected or all archived documents. You use the SRS Document Archive Purge program to purge archived documents.

Before you can use this program, you need to enable document purging using the SRS Document Archive Setup program. These settings are saved in the ..\Work\ADMSYS.dat (the Admin System Control) file on the application server.

You can select to purge all document types or a single document type.

The Delete log records older than option is used to indicate the number of months/years according to which the documents must be deleted. The selected documents which are older than the number of months/years indicated here are deleted when you select the Start Purge function. This option can only be changed if the option Allow run time selection is selected in the SRS Document Archive Setup program. If you select Purge all records, then all the archive documents for the selected document types are deleted, irrespective of their age.

When archive records are purged, the program deletes:

  • The relevant entries in the SRS archive control files/tables

  • The relevant PDF and RPT files from the relevant folders within the archive root folder on the application server.

  • The relevant year and month subfolders from within the archive root folder on the application server (if they are empty).

[Note]

The purge program does not remove the subfolder that was created for the specific document type. It also does not remove the SRS archive control file/table of the document type.

Document Types

Document types are the different types of transactional documents (e.g. invoices, Statements, Purchase Orders, etc) that you can create.

The document types are grouped together per module within the SRS Document Print Setup program and all the standard SYSPRO stationery formats are included. You can collapse or expand all these groups.

You cannot delete the standard document types. If you added custom document types, then Yes is displayed in the Custom column of the Document Types pane.

The SRS Document Types is accessed from within the SRS Document Print Setup program and can be used to:

  • Add new document types (3rd party developers only).

  • Copy an existing document type to a new document type for customization (3rd party developers only).

  • Delete an existing document type (customized document types only).

  • View and maintain the available archive search fields of standard and customized document types.

  • Enable document archiving by saving the document type (in SQL companies this creates the archive control table in the database).

  • Re-index the archive control table (SQL companies only).

The Document Types pane displays the standard document types, as defined in the control file ..\Base\ReportingServices\ReportMenu\Documentmenu.xml, as well as the custom document types, as defined in the control file ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml (if it exists).

Adding a new document type or customizing an existing document type is a 3rd party developer's function. The reasons are:

  • For completely new document types, you must edit files in the ..\Programs folder on the SYSPRO application server.

  • A developer needs to generate valid XML and XSD files.

  • Custom document format setup/printing programs may be required.

A document type consists of the following details:

  • A type description.

  • A module name which you select from a drop-down list.

  • The type of document type which is either a standard SYSPRO document type or a custom document type created by a 3rd party developer.

  • A schema file name which this indicates the XSD file associated with the document type. The default location for schema files on the application server is ..\Base\Schemas.

  • An XML file name - this indicates the XML file associated with the document type. The default location for schema files on the application server is ..\Base\Schemas.

The XML document consists of simple tags (called elements) that describe the data together with the actual data.

The XSD file is a definition file that defines what makes up the valid XML document. It defines all the valid elements along with possible attributes and the values they can take. The XSD file also contains the available key fields which can be used as selected archive fields against each document type.

3rd party developers need to supply the relevant XML and XSD files for new document types.

The SRS Document Types window is a standard SYSPRO user-interface and all the standard SYSPRO user-interface customization capabilities apply to this window.

Customization of Document Types

An entry for a document type is created/updated in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file when you:

  • Add a new document type (custom).

  • Change the XML or XSD files linked to an existing document type (custom).

  • Assign or remove selected archived fields (standard/custom).

You cannot change the XML and XSD files that are linked to standard document types. You can only change the selected archive fields for standard document types. You can, however, copy a standard document type to a new custom document type, and then change the XML and XSD files for the document type.

If a developer changes the document print program to include new fields for the document type, then these new fields need to be added to the XSD and XML files associated with the document type. These fields must be inserted into a custom version of the XSD and XML files. The developer will need the source code of the document print program in order to customize the print program to include these new fields.

If a developer needs to create a completely new document type, the developer must:

  1. Create a new unique name for the document type and use this as the identifying key in the document print control files.

  2. Create entries in the ..\Programs\IMPWRF??.IMP files so that the programs can lookup into these files for the detail line type.

  3. The unique name must be coded into the setup and print programs for the document type in order for the programs to find the details for that type in the control files.

  4. Add a new document type to the ..\Programs\IMPSRA.IMP file.

  5. Add a new document type using the SRS Document Types program and link the document type to the customized XML and XSD created.

At document design and print time the relevant programs make use of the custom schemas (XSD), if defined. If these are not defined and no custom schemas exist, then the standard schemas (XSD) are used. There are no standard XML and XSD files available for a completely new document type created by a 3rd party developer.

When you select to save a document type, the program performs various validations in the background. If the SRS Document Types program becomes non-responsive when you select to save a custom document type, then you need to verify that you are using the correct XML and XSD files and that these files are valid SRS document printing XML files.

When you delete a custom document type, then:

  • the entry for the custom document type is removed from the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file.

  • the SRS archive control file/table associated with the custom document type is not deleted.

  • the entry for this custom document type is not removed from the ..\Programs\IMPSRA.IMP file.

Selected archive fields per document type

All the document information is saved within the archived documents, but you need to define the fields that are going to be used as the search fields for the specific document type. These fields are used in the document type's Document Archive Viewer program to search on existing archived documents.

The search fields available for standard document types are defined in the document type's XSD file and cannot be changed. Every standard document type has mandatory pre-defined archive search fields which you cannot remove. Before you start archiving the specific document type's documents, you need to add any additional search fields to the document types (if you require any).

You use the SRS Document Types program to view the existing selected archive search fields and to add or remove additional (optional) search fields.

The Available Archive Fields pane lists all the fields that can be selected as archive search fields (as defined in the XSD file). The Currently Selected Archive Fields pane contains a list of the fields that are selected (..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file). Mandatory fields cannot be removed and are search fields that are automatically used to search for archived documents. The selected fields are displayed in the Filter Options pane (in a group called Selected archive fields) in the Document Archive Viewer programs.

Before you can start archiving documents, you need to open the document type from within the SRS Document Print Setup program and select the Save and Close option in the SRS Document Types window. This creates an entry for the document type in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file. If this file does not exist, or if the entry for the specific document type does not exist, then documents are not archived for the document type.

[Note]

The Save and Close option is enabled only the very first time the SRS Document Print Setup program is run for that document type. Thereafter it is enabled only when you make any changes.

When the SRS Document Types program is opened, it validates that:

  1. the specific document type's archive control table exists on all SQL databases for all companies. It only checks the SQL databases that have matching ?ADMCTL.* company control files in the ..\Work folder.

  2. all the mandatory columns are present in the table.

  3. all the user-selected archive fields are present in the table.

  4. the type and size of each column already on the table matches the type and size of the specified column in the schema file (*.xsd) for the document type.

If the validation process fails on any of these points, then the SRS Document Types program returns the warning message Invalid or missing archive control table (SQL only). The warning message includes a list of SQL databases where the validation failed. You have the option to correct the archive control table in the SQL databases.

The selected archive fields are applied to all your SYSPRO companies (CISAM and SQL). You cannot have different selected archive fields for the same document type in two different companies.

The selection of these fields must be planned carefully, because when you change the selection of archive fields, the documents already archived are not changed to include/exclude your new selection. Only documents archived after the changes were made will reflect such changes.

The more additional fields you add, the longer the Document Archive Viewer program will take to display the archived documents.

[Note]

The SRS Document Types program automatically converts the CISAM files as well as the SQL tables when you make changes to the selected archive fields (using the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file). The only difference is that if nothing has yet been archived for that document type, then there are no CISAM files to convert, whereas the SQL table will already have been created.

Document Templates

Document templates are used to design basic layouts for documents. Document printing programs use these templates to generate transactional documents, such as invoices, order acknowledgements, stock receipts, etc.

You use the SRS Document Template program to:

  • Add new templates and template configurations.

  • Design templates using Crystal Reports.

  • Change existing template configurations.

  • View history and details of existing template configurations.

  • Delete template configurations.

When you select a document type for the first time, there are no existing template configurations linked to it. You need to add a new template configuration for the document type. When you select to add a new template configuration, the Add SRS Document Template window is displayed.

When you select to add a new template (from the SRS Document Print Setup program), then you need to:

  1. Create the new template file using the Add SRS Document Template program.

  2. Define the document template options using the SRS Document Template program.

  3. Define the printers using the SRS Document Template program.

[Note]

The SRS Document Template window is a standard SYSPRO user-interface and all the standard SYSPRO user-interface customization capabilities apply to this window.

Creating Document Templates

The Add SRS Document Template window is displayed when you select to add a template configuration to a document type.

The document type is displayed in the Document type field and cannot be changed.

You need to enter a unique template description which is used as the template configuration name and it is displayed in the Template name column in the Templates pane of the SRS Document Print Setup program. The document description field allows you to enter a unique value that identifies the document to you. The program controls the actual template file name to ensure that no invalid characters are used in the file name.

To create a new template configuration, you can:

  • Copy a template - see Copying a Template.

  • Use an existing template

  • Create a blank template.

A template file (*.rpt) can be linked to more than one template configuration.

[Note]

When you add a new document, the Add SRS Document Template program determines the next available id for that document type.

You can add the Template id column to the Templates listview in the SRS Document Print Setup program (using the Field Chooser option) to verify that the Template id and the file name suffix are the same.

The Add SRS Document Template program checks for any gaps in the template ids used for each document type. If there is a gap, then the program fills the gap. If there are no gaps, then the program uses the next available id.

Copying a Template

You can select to create a new template by copying a:

  • Sample template

  • Existing template

  • External template file.

If you copy a sample template, then the Browse option only displays the list of sample documents defined by SYSPRO for the document type; it is not a file system browse, but a browse on the document print control files.

Every document type, except the Invoice document type, has two sample templates linked to it:

  • sample_blank_*.rpt: This is a blank template which you use to design your own template.

  • sample_*.rpt: This is a pre-designed template which you can use as is, or modify using the Design function of the SRS Document Print Setup program.

[Note]
  1. In both these sample templates the document type's XML and XSD files are used as the data source within Crystal Reports.

    In the blank template, no fields were added to the different sections of the document.

    The pre-designed template has fields from the data source already added to the different sections of the document and you can use this template as an example or a basis to design a template for your SYSPRO company.

    These pre-designed templates have The Outdoors Company logo embedded in them.

  2. The Invoice document type has an extra sample template for consolidated dispatch invoices (sample_so_cons_invoice_document.rpt).

When you copy an existing template, the Browse option only displays documents already created for the document type; it is not a file system browse, but a browse on the document print control files. The actual existing template files, in the ..\Base\ReportingCustomized\DocumentTemplate folder are not displayed.

If you copy an external template file, then the Browse option displays a file system browse on either the client or the server (depending on your selection at the External file location option) to allow you to select a file that is not in the document print control files yet. This template file is then copied into the ..\Base\ReportingCustomized\DocumentTemplate folder.

When you create a new template by copying:

  1. A template file (*.rpt) is created in the ..\Base\ReportingCustomized\DocumentTemplate folder on the application server. The new template file name is documenttype_number.rpt, where number is the same as the Template id column. Examples are discount_notes_0001.rpt, discount notes_0002.rpt.

  2. The template file is an exact copy of the original template file used as the basis. It uses the same data source and fields as the original template.

  3. A new template configuration is created in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file.

Using an Existing Template

The difference between an existing template and an external template is that an existing template is already contained within the document printing control files.

This is useful when you want to use the same template for two template configurations, where in one template configuration you enabled archiving and in the other template configuration you do not enable archiving. You can then create two separate document formats in the specific document format program, using the same template. The one format can be used when the documents must be printed and archived and the other format can be used when you only want to print the documents.

If you use an existing template, then the Browse option displays only documents already created for the document type; it is not a file system browse, but a browse on the document print control files. The actual existing template files, in the ..\Base\ReportingCustomized\DocumentTemplate folder are not displayed.

If you use an external template file, then the Browse option displays a file system browse only on the server and is limited to the ..\Base\ReportingCustomized\DocumentTemplate folder (as the template will not be copied but used).

When you select to use an existing template:

  1. A template file (*.rpt) is not created in the ..\Base\ReportingCustomized\DocumentTemplate folder on the application server.

  2. A new template configuration is created in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file.

[Note]

When you are copying an external template, the file can exist anywhere as the program copies it into the ..\Base\ReportingCustomized\DocumentTemplate folder.

When you are using an existing template, then the template must already exist in the ..\Base\ReportingCustomized\DocumentTemplate folder.

Creating a new template

When you create a new template:

  • You cannot enter a template name in the Template field.

  • A new template file (*.rpt) is created in the ..\Base\ReportingCustomized\DocumentTemplate folder on the application server.

    The new template file name is documenttype_number.rpt, where number is the same as the Template id column. Examples are discount_notes_0001.rpt, discount notes_0002.rpt.

  • The template file is blank and there is no valid data source defined in it.

    You need to set the data source location manually to the relevant document type's XML and XSD files (..\Base\Schemas). To do this, you can either update the data source to an existing connection or you need to create a new connection to the XML data.

  • A new template configuration is created in the..\Base\ReportingCustomized\DocumentControl\Documents.xmlcontrol file.

Document Template Configuration

The template configuration (SRS Document Template) contains all the required information regarding the template and the options to be used with the template. This includes:

  • The template configuration description

  • The template file name (*.rpt)

  • The document template options for archiving, printing, emailing and faxing

  • Printer information

  • History and details.

The information displayed in the SRS Document Template program is saved in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file on the application server.

You can copy an existing document template configuration to a new document template configuration by selecting Edit > Copy in the SRS Document Template program. The program creates a default document description by adding a (2) to the original document description. You can change this document description and all the document template options.

[Note]
  • When you delete a document configuration, then it is important to note that only the document configuration is removed from the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file. The physical template file (*.rpt) is not deleted from the ..\Base\ReportingCustomized\DocumentTemplate folder on the application server. If you need to remove the physical template file, then you have to use Windows Explorer.

  • No checks are performed to establish whether the document template configuration is linked to any document formats.

    The document formats that are linked to the template configuration (defined in the document format programs) are not deleted. This may result in an error message No documents found for this document type. Print Cancelled when this format is used in the document printing programs.

You can select the Design function from the SRS Document Template program to design the template using Crystal Reports.

History

The History pane is not displayed by default and a History tab is available in the SRS Document Template program. You can pin the History pane on the window if you need it to be loaded when the SRS Document Template program is opened.

The information displayed in this pane is saved in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file on the application server. The operator code, type of action, date and time are saved in this file against the template configuration and are displayed in the History pane.

Details

The Details pane is not displayed by default and a Details tab is available in the SRS Document Template program. You can pin the Details pane on the window if you need it to be loaded when the SRS Document Template program is opened.

The information displayed in this pane indicates if the template file, schema file and XML data file are located on the local machine (standalone environment) or the application server (client/server environment). It also indicates the full path names to these files.

Email Options

You use the SRS Document Template program to define the options for emailing your documents using the specified template.

You need to select the Microsoft Outlook option as the email method to use for the document template configuration.

The option selected here is independent of the email settings set in the Company Maintenance program .

If you want to develop your own email client, then you still select the Microsoft Outlook option.

If you are using Microsoft Outlook 2003 or Microsoft Outlook 2007, then you can:

  • Use Microsoft Outlook

  • Use Outlook Email Client

  • Develop your own email client.

If you are using Microsoft Outlook 2010, then you can:

  • Use Outlook Email Client

  • Develop your own email client.

[Note]

Macro using VBScript is not supported as an email method in SRS document printing.

The Different Email Methods Explained

Microsoft Outlook was the original method used by SYSPRO to create and send email items. It uses a client-side program and Simple MAPI (Messaging Application Programming Interface). The Simple MAPI code does not work with Microsoft Outlook 2010.

The Outlook Email Client is a client-side .NET assembly/executable named SYSPROEmailClient.exe that sends mail using something other than Simple MAPI. It was developed by leveraging of Microsoft Outlook 11.0 Object Library.

When an email is created and sent, it makes use of the Microsoft Outlook profile. To perform the emailing, the programs use the Outlook Mail Item technology. This allows the programs to make use of the default email signature for the currently logged in Windows user. This is supported for Microsoft Outlook 2003 and later. In order to use this executable you need to have the relevant Outlook PIA's (for the specific version of Microsoft Outlook that you are using) installed as a pre-requisite.

You can write your own email client, using any development platform, which will send email (including using Lotus Notes or even Microsoft Outlook). This program (UserEmailClient.exe) must exist in the ..\Base folder on the client workstation. The program checks for this file and if it finds it, it will use it as the email client. If the program cannot find this file, then it uses either the SYSPROEmailClient.exe or the SYSPROEmailClient64.exe executable (depending on the version of Microsoft Outlook installed on the client workstation) as the email client.

Printers

You can link specific printers to a template configuration. This enables you to print a document to more than one device at the same time and to specify the number of copies that must be printed. This also enables you to ensure that the documents are printed to the correct printers.

[Note]

The printers defined here are used when you print or reprint the document, either online or in batch from the various document print programs. They do not apply to printing documents from within the Document Archive Viewer programs.

When you add a printer to the template configuration, you can select:

  • The printer that is set as the current printer in SYSPRO (Add SYSPRO current printer).

  • The printer linked to the template in Crystal Reports (Add Crystal template printer).

  • To browse the Windows client workstation for available Windows printers (Browse for printer).

To use SRS document printing, the Windows Printing option must be selected (SYSPRO ribbon bar->Setup->Windows Printing).

The {Current printer} is added automatically to a template configuration. The printing program attempts to determine the current printer in SYSPRO in the following sequence:

  1. Firstly, the program checks the default printer destination defined against the document type in the specific document printing program (for example, the Printer Preferences option in the Document Print program).

  2. If no default printer destination is defined against the document type, then the program checks the printer defined per program against the operator (Printers per Operator).

  3. If neither of the previous two settings are defined, then the program checks the printer currently selected as the default printer in SYSPRO.

[Note]

You can delete the {Current printer} from the template configuration, as long as you have added other printers to the template configuration. If you delete all the printers defined against the template configuration, then the {Current printer} is restored and used.

If the Request Print Dialog option is enabled then the Print window is displayed when you select to print the documents. The printer that was determined as the current printer is selected by default. If you select a different printer, the documents are printed to the selected printer. If the option Request Print Dialog is not selected and the program cannot determine the current SYSPRO printer (following the checks above), then the documents are not printed.

[Note]

If there is no current printer defined in SYSPRO, then the warning message: You have not yet defined a printer to use for reporting. This may cause unpredictable results when printing a report is displayed when you open any program:

It is not good practice to continue working if you do not define a current SYSPRO printer.

If you add printers to the template configuration, and you delete SYSPRO's {Current printer} as one of the printers, then the documents are only printed to the printers you have added, irrespective of the printer you may select when the Print window is displayed (when Request Print Dialog is selected).

If you add printers to the template configuration, and you do not delete SYSPRO's {Current printer} as one of the printers, then the documents are printed to the printers you have added, as well as to the printer you select when the Print window is displayed (when Request Print Dialog is selected).

[Note]

The {Current printer} is selected by default when the Print window is displayed, and if you select a different printer, then the documents are printed to that printer.

You use the Page Setup program in Crystal Reports to link a printer to a template file (SRS Document Print Setup - Design).

The documents are always printed with the orientation that is selected in the Page Setup program in Crystal Reports.

If you want the documents to be displayed in the SRS Preview window before printing, then the Print Preview option must be enabled.

The following are examples to help you understand how the printing options work:

Scenario 1 - You do not add any specific printers to the template configuration

  • Printer A is selected in SYSPRO's Print Setup program.

  • Printer B is defined against the program SO Batch Invoicing in the Operator Printers program.

  • Printer C is defined against the document type Invoices in the Default Printer Destinations program.

  • Printer D is defined against the document template in Crystal Reports.

  • You do not add any printers to the template configuration against the document type Invoice in the SRS Document Template program.

  • The {Current printer} is automatically added as a printer against the template configuration and you do not delete it.

 

The Request Print Dialog option is not selected before printing - when you select to print invoices, the Print window is not displayed and the documents are printed to Printer C.

[Note]

The documents are printed to the current SYSPRO printer, which in this case is the printer defined against the document type Invoices in the Default Printer Destinations program (Printer C).

The Request Print Dialog option is selected before printing - when you select to print invoices, the Print window is displayed. Printer C is selected by default, and you change it to Printer E. The documents are printed to Printer E.
[Note]

The {Current printer} is selected by default when the Print window is displayed and in this case, the current printer is the printer defined against the document type Invoices in the Default Printer Destinations program.

If you select a different printer, then the documents are printed to the selected printer. The documents are only printed to the printer you select when the Print window is displayed.

Scenario 2 - You add specific printers to the template configuration and delete {Current printer}

  • Printer A is selected in SYSPRO's Print Setup program.

  • Printer B is defined against the program SO Batch Invoicing in the Operator Printers program.

  • Printer C is defined against the document type Invoices in the Default Printer Destinations program.

  • Printer D is defined against the document template in Crystal Reports.

  • You add {Crystal Printer} and Printer F to the template configuration against the document type Invoice in the SRS Document Template program.

  • You delete the {Current printer} as a printer against the template configuration.

 

The Request Print Dialog option is not selected before printing - when you select to print invoices, the Print window is not displayed and the documents are printed to Printer D and Printer F.

[Note]

The documents are printed to the printer defined against the template in Crystal Reports (Printer D) and the other specific printer you added to the template configuration (Printer F). The documents are not printed to the current SYSPRO printer, because you deleted {Current printer} as a printer against the template configuration.

The Request Print Dialog option is selected before printing - when you select to print invoices, the Print window is displayed. Printer C is selected by default, and you change it to Printer E. The documents are printed only to Printer D and Printer F.

[Note]

The {Current printer} is selected by default when the Print window is displayed and in this case, the current printer is the printer defined against the document type Invoices in the Default Printer Destinations program.

The documents are printed only to the printers specifically added to the template configuration, which is the printer defined against the template in Crystal Reports (Printer D) and the other specific printer you added to the template configuration (Printer F). You deleted {Current printer} as a printer against the template configuration, and the printer you selected in the Print window is therefore ignored.

Scenario 3 - You add specific printers to the template configuration and you do not delete {Current printer}

  • Printer A is selected in SYSPRO's Print Setup program.

  • Printer B is defined against the program SO Batch Invoicing in the Operator Printers program.

  • Printer C is defined against the document type Invoices in the Default Printer Destinations program.

  • Printer D is defined against the document template in Crystal Reports.

  • You add {Crystal Printer} and Printer F to the template configuration against the document type Invoice in the SRS Document Template program.

  • The {Current printer} is automatically added as a printer against the template configuration and you do not delete it.

 

The Request Print Dialog option is not selected before printing - when you select to print invoices, the Print window is not displayed and the documents are printed to Printer C, Printer D and Printer F.

[Note]

The documents are printed to the current SYSPRO printer (Printer C), the printer defined against the template in Crystal Reports (Printer D) and the other specific printer you added to the template configuration (Printer F).

The Request Print Dialog option is selected before printing - when you select to print invoices, the Print window is displayed. Printer C is selected by default, and you change it to Printer E. The documents are printed to Printer D, Printer E and Printer F.

[Note]

The {Current printer} is selected by default when the Print window is displayed and in this case, the current printer is the printer defined against the document type Invoices in the Default Printer Destinations program.

If you select a different printer, then the documents are printed to the selected printer (Printer E).

The documents are also printed to the printers specifically added to the template configuration, which is the printer defined against the template in Crystal Reports (Printer D) and the other specific printer you added to the template configuration (Printer F).

The default number of copies to print is 1 and you can select a value up to 10. This is the value that is used for the number of copies, irrespective of what you select when the Print window is displayed (if Request Print Dialog is selected).

For the {Current printer} printer option only, you can select the Prompt at runtime option. If this option is selected, then the number of copies defined against the printer in the SRS Document Template program is ignored and you can enter the number of copies required when the Print window is displayed. This only applies if the option Request Print Dialog is selected.

The printer information is saved in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file on the application server.

SRS Preview

If the option Print Preview is enabled, then the documents are displayed in the SRS Preview window.

You can perform the following actions from within this window:

  • Print the documents

  • Email the documents

  • Export the documents

  • Zoom in on the documents.

[Note]

The document status is updated when you select to print the documents before the SRS Preview window is displayed. If you close the SRS Preview window without printing/emailing/exporting, the document status was already updated. You can export the documents to any one of the following formats:

  • Crystal Reports (*.rpt)

  • PDF (*.pdf)

  • Microsoft Excel (97-2003) (*.xls)

  • Microsoft Excel (97-2003) Data-Only (*.xls)

  • Microsoft Word (97-2003) (*.doc)

  • Microsoft Word (97-2003) * Editable (*.rtf)

  • Rich Text Format (RTF)(*.rtf)

  • XML (*.xml)

Designing Templates Using Crystal Reports

You can select to design the template from scratch (if you selected to create a new template), or to change the design of an existing template. When you select the Design option, the template is opened in Crystal Reports.

[Note]

The Crystal Designer must be installed on all the client workstations where the operators are going to use the Design option.

The Design option is available from:

Once the template is opened in Crystal Reports, then you can perform any of the functions that you can perform in designing SRS/Crystal reports.

[Note]
  1. The data source of the document is an XML data source that connects to the sample XML and XSD files designed for document printing. These files are saved in the ..\Base\Schemas folder on the SYSPRO application server.

  2. You need to ensure that you understand the XML structure and hierarchy. The XML data may contain nested hierarchies and aggregated values.

  3. All the data elements in the XML data source are returned as data type String. You can use formulas to convert numeric data elements to numeric fields.

  4. You can either use the Save option from the File menu in Crystal Reports or the Save Report SYSPRO add-in program (Crystal Reports->Add-ins->SYSPRO->Save Report).

    Both these methods save the template automatically on the SYSPRO application server.

  5. Ensure that you receive the Report saved confirmation message in Crystal Reports BEFORE you close the Crystal Reports application. This ensures that the template was saved to the SYSPRO application server.

Refer to Crystal Reports for details on designing templates using Crystal Reports.

Exporting Template Configurations

You can export document template configurations using the Export option from:

When you select to export a template configuration, a Select the Export folder window is displayed. This window displays the folder structure relevant to the client workstation. You need to select a destination folder for the export.

The export program creates a subfolder within this selected folder with the document template configuration name as the subfolder name. Within this subfolder, the following files are exported:

  • The document template (for example invoice_0001.rpt)

  • The document type's XML file (for example sample_so_invoice_document.xml)

  • The document type's XSD file (for example sample_so_invoice_document.xsd)

  • The document template configuration XML file (for example Invoice_Printing.xml)

[Note]

In the above examples the document type is Invoice and the document template configuration name is Invoice_Printing.

You can typically use the Export option when:

  • You designed a template and a template configuration on a local workstation and you need to deploy it on the SYSPRO application server.

  • You need to export the template configuration from the current application server to a different server, for example a test server.

  • You designed a template and a template configuration, but are having problems with the template design. You can email the exported folder contents to a support consultant for assistance.

Importing Template Configurations

You can import previously exported document template configurations using the Import option from:

When you select to import a template configuration, a Select the Export folder window is displayed. This window displays the folder structure relevant to the client workstation. You need to select the document template configuration XML file (for example Invoice_Printing.xml) from within the folder that was previously exported from another server/workstation.

[Note]

Ensure you select the correct document type from the Document Types pane before you select the Import option.

After importing of the template configuration, you can change any of the document template options and printers.

Temporary Folders and Files

While SRS documents are printed/emailed/faxed and archived, a number of files are copied from the application server to the client and back to the server as processes are completed. Sometimes some or all of these files in the temporary folder on the client workstations cannot be removed.

Possible reasons for files not being deleted include:

  • The Java runtime may still be locking the XML file.

  • If any faxing options are selected against the template configuration, then temporary files are not removed as the program does not know when the faxing software is going to process the required files.

  • If you are previewing documents, then temporary files may not be removed as the program does not know when you have closed the SRS Preview window.

  • If client-side logging is enabled for troubleshooting purposes, then temporary files are not removed.

Once the required processes are completed, the programs normally remove the temporary files.

If the programs cannot remove all of the temporary files, then the specific ..\Temp\Oper\GUID folder name is added to the ..\Work\?ADMSRD.* control file. This file is created for each company and has the company id as a prefix in the file name. This file is always in CISAM format and you can use the Reindex Data Files program to re-index the file.

The next time an SRS document printing process is opened, the program checks the dates of the entries in this control file and folders with dates older than 2 days are removed.

[Note]

The temporary folder on a workstation could for example be: C:\Users\{user_name}\AppData\Local\Temp\operator\f2dcd915-5e65-4cba-b424-596892d32a3b. Alternatively, it could be the temporary folder within the SYSPRO client installation folder. You can run %TEMP% in Windows to open the Windows temporary folder on the workstation.

Troubleshooting

This section describes error conditions you could encounter with SRS document printing, together with possible causes and remedies.

SRS Print Error

Symptom

When you print documents using an SRS document format, you receive an error message No document has been selected for this format. Print cancelled.

Cause

The document format print method, in the specific document format program, is set to SRS document, but when you select SRS Options against the format, there is no template configuration linked to the document format.

There is no entry for the document type in the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file.

This can be caused when

  • The user who added the document format did not define the SRS options before saving the format.

  • The template configuration was deleted, using the SRS Document Print Setup program.

Remedy

Add a template configuration to the document type.

Invalid or missing archive control table

Symptom

You receive an error message Invalid or missing xxx archive control table, where xxx is the document type, when you:

  • Open the Document Archive Viewer program for the document type.

  • Open the document type, using the SRS Document Types program.

  • Select a smart link for this document type in one of the other SYSPRO programs.

[Note]

This only applies to SQL companies.

Cause

In an SQL company, the document type's SRS archive control table must exist and must be valid before you can archive documents. The database table is created and validated when you save the document type.

This error message is caused either when:

  • The SRS archive control table does not exist in one or more SQL databases.

  • The table definition of the SRS archive control table is not valid (the program validates it using the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file).

Remedy

You need to create/correct the SRS archive control table for the document type by doing one of the following:

  • Select the Run SRS Document Print Setup option, if it is available on the error message window, and use the SRS Document Types program to save the document type. When you select Save and Close, the SRS archive control table is either created or corrected in all the valid SQL databases in your environment.

  • Select the Correct Archive Control Tables option, if it is available on the error message. This creates the control table or corrects the table definition of the control table in all the valid SQL databases in your environment.

  • Maintain and save the document type, using the SRS Document Types program.

Document type could not be found

Symptom

When you copy a document type to a new document type and you select to save the new document type, you receive an error message The document type could not be found in the IMPSRA.IMP control file. A new document type must first be added to this file.

You can also receive this message when you add a new document type from scratch.

Cause

Before you can create a new document type, the document type must exist in the..\Programs\IMPSRA.IMP control file on the application server.

Remedy

You need to edit the ..\Programs\IMPSRA.IMP control file and add the document type, before you attempt to save the new document type.

[Note]

Incorrect editing of this file can cause problems with standard document types and creation of archiving control files/tables.

Document type program not responding

Symptom

When you select to save a document type, the program becomes non responsive and you have to kill the SYSPRO process.

Cause

When you select to save the document type, then the SRS Document Types program performs various validations in the background. If the program becomes non responsive, then this can be caused by invalid XML and XSD files linked to the document type.

Remedy

You need to ensure that you are using the correct XML and XSD files in the document type configuration and that these files are valid SRS document printing XML files.

Document type cannot be saved

Symptom

When you select to save a document type, using the SRS Document Types program, you receive a Document Type xxx cannot be saved (where xxx is the document type) message.

Cause

There are pending archive document batch entries for this document type. You cannot change and save a document type if there are any pending entries for this document type in the pending archive control file or table.

Remedy

You need to either archive or delete the entries for the document type in the pending archive control table (See: Document pending archive).

You can:

The document type per batch is displayed in the listview. You can sort the listview by theDocument Type column and then select to:

  • Archive the document batches or

  • Delete the document batches

You have been denied access to SQL Administrative Login

Symptom

You receive a You have been denied access to program: SQL Administrative Login message when you:

  • try to save a document type using the SRS Document Types program.

  • try to open one of the Document Archive Viewer programs.

Cause

The operator group you belong to does not have access to the program IMPSLG - SQL Administrative Login.

When you open one of the above two programs, the program is checking the existence of the SRS archive control tables in the SQL databases. The program needs access to the SQL administrative login to log into the SQL instance.

Remedy

You need to give the operator group you belong to access to the program IMPSLG - SQL Administrative Login.

Resource lock message

Symptom

When you open an SRS document printing program, you receive an error message The xxx control file resource is being locked by another user.

You can receive this error message when:

  • You attempt to open a document type using the SRS Document Types program (the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file is locked).

  • You attempt to add/change/delete a document template configuration using the SRS Document Template program (the ..\Base\ReportingCustomized\DocumentControl\Documents.xml control file is locked).

Cause

Possible causes for this error message are:

Remedy

Suggested solutions include:

  • Wait a few minutes and then try again to open the relevant program. The operator's name locking the file is displayed in the error message.

  • Select Shift+F7 and select Current Users to see which operator is accessing the SRS document print programs. Clear inactive users.

  • If you are sure that no operators are actively using the SRS document print programs, then this error might be caused by a runaway or an inactive client process. You can try and kill unknown or runaway processes on the SYSPRO application server.

  • If none of these remedies works, then you need to either restart the SYSPRO services or restart the SYSPRO application server.

Diagnostics

Various diagnostics routines were developed to help identify and resolve problems relating to SRS document printing.

[Note]

The diagnostic features should only be enabled for the minimum time required to find the problem as the routines create output log files which may slow down the system and use excessive disk space.

You access the diagnostic codes from the Diagnostics field on the General tab of the System Setup program (SYSPRO ribbon bar->Setup->General Setup->System Setup).

Diagnostics are only activated with the next login into SYSPRO. Refer to Diagnostic Codes for additional information.

The following table indicates the log files that can be created based on the diagnostic code used:

Log File Name and location Created on Diagnostic codes and details

\temp\Comp_?_Oper_XXXX_SRSLog.txt (? is the company id and XXXX is the operator code)

Client

SRSD02, SRSD03, SRSD99

Program location information is written to this log file, including:

  • Operator details

  • Program versions

  • Printer details

  • Temporary folders

  • XML and XSD file names

  • Template file name

  • Procedure calls.

\Base\Settings\Oper.txt

Server

SRSD02, SRSD99

The procedure calls made by the SRS printing programs are recorded in this log file.

\temp\SRS_Document_Archive.log

Client

SRSD04, SRSD06, SRSD99

The procedure calls made by the archiving program are recorded in this log file.

\temp\*SRS_Document_Archive_COMQSR*.xml

Client

SRSD05, SRSD06, SRSD99

These files contain information about the XML data files in the document batch that must be archived. The business object COMQSR returns this information.

\temp\*SRS_Document_Archive_COMTSR*.xml

Client

SRSD05, SRSD06, SRSD99

These files contain the archiving information that is written back to the application server by the business object COMTSR.

Creating server-side log files

You typically use this procedure when you have problems with SRS document printing and are asked to send log files to your local support office.

  1. Open the System Setup program SYSPRO ribbon bar->Setup->General SetupSYSPRO ribbon bar->System Setup

  2. Enter the diagnostic code that creates server-side log files.

    The following diagnostic codes create server-side log files for SRS document printing:

    • SRSD02

    • SRSD99.

  3. Locate the log file.

    1. Open Windows Explorer.

    2. Locate the log file in the ..\Base\Settings folder of the SYSPRO installation.

Creating client-side log files

You typically use this procedure when you have problems with SRS document printing and are asked to send log files to your local support office.

  1. Open the System Setup program SYSPRO ribbon bar->Setup->General Setup->System Setup.

  2. Enter the diagnostic code that creates client-side log files.

    The following diagnostic codes create client-side log files for SRS document printing:

    • SRSD02

    • SRSD03

    • SRSD04

    • SRSD05

    • SRSD06

    • SRSD99

  3. Locate the log file.

    1. Open Windows Explorer.

    2. Locate the log file in the temporary folder on the client workstation.

      This is either the windows temporary folder (which you can find by running %temp% in Windows) or the ..\Temp folder within the SYSPRO client installation.

Notes and warnings

Restrictions and limits

  • SRS Document printing ignores any characters that are below a space in the ASCII table except for the line feed and the tab characters.

Activity considerations

Operator access to the following activities applicable to SRS Document printing can be restricted. You configure this using the Security Activities function of the Operator Maintenance program.

Activity Description
SDS Allow viewing of PDF documents in archive viewer Controls whether an operator can view .pdf documents in the Document Archive Viewer programs. This only applies when document archiving is enabled and the Archive type is set to PDF or Both (SRS Document Template).
SDS Allow email from document archive Controls whether an operator can email documents from the SRS Preview screen (see SRS Preview).
SDS Allow print from document archive (crystal format only) Controls whether an operator can print .rpt documents from the SRS Preview screen (see SRS Preview).
SDS Allow export from document archive (crystal format only) Controls whether an operator can export .rpt documents from the SRS Preview screen (see SRS Preview).
SDS View operator role archived items

Controls whether an operator can view archived reports for other operators in the Document Archive Viewer programs when operator roles are defined (Role Management).

Enabling this activity enables all operators in the same role to view documents in the Document Archive Viewer programs, irrespective of which operator in the role generated the document. When not enabled, only the archived reports generated by an operator are displayed when that operator accesses the Document Archive Viewer programs.

SDS View all archived items

Controls whether an operator can view archived reports for all operators in the Document Archive Viewer programs, irrespective of which operator generated the document.

When not enabled, only the archived reports generated by an operator are displayed when that operator accesses the Document Archive Viewer programs.

SRS Allow prompt for email attachments Controls whether an operator is prompted to select the attachment type when emailing a document. This only applies to emailing using the Outlook Email client when previewing documents from client side document printing. This does not affect documents previewed from the document archive.

Allowing access to SRS document printing programs

  1. Open the Operator Group Maintenance program (SYSPRO ribbon bar > Setup Groups).

  2. Select the operator group and select Change from the Edit menu.

  3. Scroll down to the Reporting Services module and allow access to the required SRS document printing programs.

  4. Save your changes.

Allowing role access to Document Printing programs

You would typically use this procedure if you are using role-based security to allow access to programs and operator activities.

  1. Open the Role Management program (SYSPRO ribbon bar > Home > Role Management).

  2. Select the role to be maintained.

  3. Within the Role Information pane, select Configured by role at the Program access field, and then select the Browse icon.

    [Note]

    If it is the first time you are selecting the Configured by role option, then access is denied to all programs by default. You will need to configure program access across all modules, and not just for the SRS document printing programs.

  4. Scroll down to the Reporting Services module and provide access to the required programs.

  5. Save your changes.

Allowing role access to Document Services activities

You would typically use this procedure if you are using role-based security to allow access to programs and operator activities.

  1. Open the Role Management program (SYSPRO ribbon bar > Home > Role Management).

  2. Select the role to be maintained.

  3. Within the Role Information pane, select Configured by role at the Activities and fields field, and then select the Browse icon.

  4. From the Activities group, select List at the Activity selection field and select Edit at the Configure activities field.

  5. Scroll down to the SYSPRO Document Services module and provide access to the required SDS operator activities.

  6. Save your changes.

Allow access to Document Services operator activities

You would typically use this procedure to allow an operator access to the SDS (SYSPRO Document Services) operator activities. Access to these activities is only required when SRS documents are archived.

  1. Open the Operators program (SYSPRO ribbon bar > Setup Operators).

  2. Highlight the operator and select Change from the Edit menu.

  3. Select the Security tab.

  4. From the Activities group, select List at the Selection field and select Edit at the Configure Activities field.

  5. Scroll down to the SYSPRO Document Services module and allow access to the required SDS operator activities.

  6. Save your changes.

Creating client-side log files

You would typically use this procedure when you are having problems with SRS document printing and you were asked to send log files to your local support office.

  1. From the System Setup program, enter the diagnostic code that creates client-side log files.

    The following diagnostic codes create client-side log files for SRS document printing:

    • SRSD02

    • SRSD03

    • SRSD04

    • SRSD05

    • SRSD06

    • SRSD99.

  2. Open Windows Explorer and locate the log file in the temporary folder on the client workstation.

    This is either the windows temporary folder (which you can find by running %temp% in Windows) or the ..\Temp folder within the SYSPRO client installation.

Creating server-side log files

You would typically use this procedure when you are having problems with SRS document printing and you were asked to send log files to your local support office.

  1. From the System Setup program, enter the diagnostic code that creates server-side log files.

    The following diagnostic codes create server-side log files for SRS document printing:

    • SRSD02

    • SRSD99.

  2. Open Windows Explorer and locate the log file in the ..\Base\Settings folder of the SYSPRO installation.

Adding a document type to the IMPSRA.IMP file

You would typically use this procedure:

  • Before you add a new document type.

  • Before you copy an existing document type to a new document type.

  • When you receive the error message The document type could not be found in the IMPSRA.IMP control file. A new document type must first be added to this file in the Maintain SRS Document Types program.

  1. Open Windows Explorer on the SYSPRO application server.

  2. Navigate to the ..\SYSPRO\Programs folder.

  3. Add the document type to the IMPSRA.IMP file.

    1. Select the IMPSRA.IMP file.

    2. Open the file with Notepad.

    3. Add the document type details to the file.

      You need to add the document type and a unique code within the correct module section of this file. The file layout that you must follow is defined at the top of this file.

      [Note]

      Incorrect editing of this file can cause problems with standard document types and creation of archiving control files/tables.

  4. Save your changes.

Viewing archived documents using smart links

You would typically use this procedure to view archived documents while you are in another SYSPRO program.

[Note]

A smart link is a customizable mini-menu that allows you to launch predefined context-sensitive functionality, SYSPRO programs or executables (.exe) that you have added.

  1. Open the SYSPRO program you want to use.

  2. Navigate to the column that has been configured to be smart link-aware and select the drop-down option to view the menu.

    Smart links become available when you move your mouse pointer over a column that has been configured to be smart link-aware. This is indicated by an icon containing an i with a circle around it.

  3. From the smart link menu, select the link for the relevant type of archived document and preview the document.