SRS Documents > Document Setup > SRS Document Print Setup > SRS Document Types

SRS Document Types

You use the SRS Document Types program to add or copy SRS document types and to indicate the fields from the document that you want to use for archiving purposes.

[Note]

The facility to add new document types and to copy document types is provided for use by developers.

For end users, the SRS Document Types program is primarily used to indicate the fields required for archiving purposes.

This program can be accessed by either selecting the Edit->New->Type option or the Add icon from the Document Types pane of the SRS Document Print Setup program.

Toolbar and menu

Field Description
File  
Save Select this to save any changes you made.
[Note]

You cannot save your changes if you changed the archive fields for the document and records for the document type exist in the pending archive control table.

This is to prevent the pending archive records from becoming invalid by your changes.

You are given the option to view the pending archive.

Edit  
New Select this to add a new document type.
[Note]

The facility to add new document types is provided for use by developers only.

Delete Select this to delete the current document type. You are prompted to confirm the deletion of the document type.
[Note]

Standard document types supplied by SYSPRO cannot be deleted.

Copy Select this to create a new document type by copying the currently displayed document type.

You are prompted to confirm whether you want to copy the current document type.

[Note]

The facility to copy document types is provided for use by developers only.

Options  
Reindex Archive Control Table This is only applicable in an SQL based company. Selecting this option drops and re-adds the SQL keys and indexes for the archive control table.
Functions  
Reset customizable fields Select this to set the following fields back to {default}:
  • Print options - File name format

  • Email options - Default Email subject line format

Note that both these fields are simultaneously reset.

New Select this to add a new document type.
[Note]

The facility to add new document types is provided for use by developers only.

Delete Select this to delete the current document type. You are prompted to confirm the deletion of the document type.
[Note]

Standard document types supplied by SYSPRO cannot be deleted.

Save and Close Select this to save any changes you made and to exit the program.
Type description Enter the description for a new document type you want to add or copy.

If you selected to change a standard document type from the SRS Document Print Setup program, then the description of the document type you selected is displayed. This enables you to assign archive fields to the document.

Document Type Details

This screen is displayed when you select the Copy option from the Edit menu and confirm that you want to copy the document type.

Field Description
Document type This indicates the description for the new document type you are creating by copying the current document type.

This defaults to the current document type description plus a numeric value, but can be changed.

OK Select this to accept the document type description.
Cancel Select this to return to the previous screen.

Document Type

The fields in this pane are displayed for information purposes only when you are maintaining a standard SYSPRO document type.

The fields become enabled when adding a new document type or copying a document type. This functionality is intended for use by developers only.

Field Description
Type description This indicates the description of the document type.
Module This indicates the SYSPRO module in which the document type resides.
Type This indicates whether the document type is a standard SYSPRO supplied type or a custom (developer defined) document type.
Schema file This indicates the xsd file for the document type.
Xml file This indicates the xml file for the document type.
Print options  
File name format Optionally enter the attachment file name to create when emailing documents using this document type.
[Note]

This does not change the file name format of SRS Document Archives.

The file name format for archived files on the server is always: MACHINENAME_OPERATOR_DATE_TIME.PDF

You can specify any variables displayed in the Variables pane together with any text you require.

The variables and text you enter are used as a template for the attachment file name when creating the document.

You need to manually enter the variables and the text. Note that the variables are case sensitive.

For example, for AR Statements you could have:

%CustomerAccntNumber%StatementDateCymd

If you entered a string against the document template (SRS Document Template), then the string entered there takes precedence over the string entered here.

You can revert this field back to {default} by selecting the Reset customizable fields option from the Functions menu. Note that this option also simultaneously reverts the Default Email subject line format field under the Email options to {default}.

When using the Outlook email client to email from the SRS Document Preview window, the document is always attached as a PDF file.

Email options  
Default email subject line format Optionally specify the format of the email subject by adding the variables you want to use.

You can specify any variables displayed in the Variables pane together with any text you require.

The variables and text you enter are used as a template for the actual subject line when creating the document.

You need to manually enter the variables and the text. Note that the variables are case sensitive.

For example, for AR statements, you could have:

Statement for %CustomerName % StatementDateCymd

The text and variables are space delimited.

When emailing a single document (as opposed to a batch of documents) from within SYSPRO, you are prompted to confirm the email details prior to sending the document.

Note that when the program that generates the final document passes default information for this field, then you need to delete the default information passed from that program and enter the required information manually.

For example, in Sales Orders, a default subject line is automatically generated by the Sales Order Print program. The SRS Document Printing program will not overwrite this subject information, so you need to change it manually if you want a different subject.

If you entered a string against the document template (SRS Document Template), then the string entered there takes precedence over the string entered here.

You can revert this field back to {default} by selecting the Reset customizable fields option from the Functions menu. Note that this option also simultaneously reverts the File name format field under the Print options to {default}.

Variables

This pane lists the variables you can use to format the Email subject line and the attachment File name for emailing documents using the selected document type.

Variables prefixed with a % are specific to each document type and are the same fields you selected as the available archive fields (see Archive.) Variables prefixed with a $ are system-wide variables and are available for all document types.

[Note]

The variable names are case sensitive, so they must be entered exactly as displayed.

Archive

When, for specific document type/template combinations, you select to archive the SRS documents (SRS Document Template), the documents are archived using the mandatory key fields. You will, therefore be able to search the archived documents using these key fields as selection criteria.

In addition to the mandatory key fields, you can indicate additional fields according to which you want to be able to search on archived documents using the Document Archive Viewer programs.

[Note]
  • 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 reflected such changes.

  • The more additional fields you add, the longer the system will take to display the documents in the Document Archive Viewer.

  • If you use multiple SYSPRO companies, then the same archived information is recorded per document type in each company.

  • You will be unable to save your changes if you changed the archive fields for the document and records for the document type exist in the pending archive control table. This is to prevent the pending archive records from becoming invalid by your changes.

    You are given the option to view the pending archive.

Available Archive Fields

This listview displays the fields which can be selected for inclusion in the archive list.

Field Description
Assign Selected Select this to assign the field(s) currently highlighted in the Available listview to the list of fields you want to include in the archive list (the Selected listview).

You can use the Ctrl and Shift keys together with your mouse pointer to individually highlight the items you want to assign.

Assign All Select this to assign all fields currently displayed in the Available Archive Fields listview to the Currently Selected Archive Fields listview.
Field name This indicates the descriptive name of the field.
Table name This indicates the table in which the field is located.
Column name This indicates the column name for the table.
Length This indicates the length of the field.
Default field

Default fields are the suggested fields that you would typically include as archive fields. These are only indicated when you initially load the SRS Document Types program for a specific template.

Mandatory field This indicates whether the field is a mandatory field for archive searching. Mandatory fields cannot be removed from the list of Selected Archive Fields.

Currently Selected Archive Fields

This listview displays the fields currently selected for inclusion in the archive list.

[Note]

Mandatory fields cannot be removed.

Field Description
Remove Selected Select this to remove the currently highlighted field(s) from your list of fields in the Currently Selected Archive Fields listview.

You can use the Ctrl and Shift keys together with your mouse pointer to individually highlight the items you want to remove.

Remove All Select this to remove all items from the Currently Selected Archive Fieldslistview.
Field name This indicates the descriptive name of the field.
Mandatory This indicates whether the field is a mandatory field for archive searching. These fields cannot be removed from the list of Selected Archive Fields.

Error messages

SRS Document Type Error

Refer to Unable to Launch SYSPRO Reporting Services.

Adding a custom document type

  • Ensure that you have added the document type details to the ..\Programs\IMPSRA.IMP file on the application server.

You would typically use this procedure when you want to create documents for a document type that does not exist as a standard document type and you cannot customize a standard document type to comply with the requirements.

[Note]

Creating custom document types requires 3rd party development.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. Select (New > Type) from the Edit menu.

  3. Enter a description in the Type description field and select a module from the drop-down list to add the document type to.

  4. Select the schema file (*.xsd) and the XML file supplied by the 3rd party developer.

  5. Select the archive fields that must be used for searching archived documents.

  6. Save your changes.

    The new document type's details are saved to the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file. In a SQL environment, the SRS archive control table for the document type has also been created in all the valid SQL databases in your environment.

Changing a custom document type

You would typically use this procedure when you need to change the schema and XML files that define the custom document type. You need to update the selected archive fields as well.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. Select the custom document type in the Document Types pane, and select (Change > Type) from the Edit menu.

  3. Change the schema and XML files, if required.

  4. Select the archive fields that must be used for searching archived documents.

  5. Save your changes.

    The document type details in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file are updated. In a SQL environment, the archive control table in all the valid SQL databases is converted (to apply the changes you made to the selected archive fields). In a CISAM environment, the archive control file (for all companies) is also converted, if it already exists.

Changing the selected archive fields

You would typically use this procedure when:

  • you need specific search fields to be available for use as custom filters in the Document Archive Viewer programs.

  • there are unused or irrelevant search fields available for use as custom filters in the Document Archive Viewer programs.

This procedure applies to standard and custom document types.

[Note]

The selection of the archive search fields should be planned carefully. If you change 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.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. Select the document type in the Document Types pane and select (Change > Type) from the Edit menu.

  3. Assign more fields from the Available Archive Fields pane or remove fields from the Currently Selected Archive Fields pane.

    [Note]

    You cannot remove mandatory archive fields.

  4. Save your changes.

    The document type details in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file are updated. In a SQL environment, the archive control table in all the valid SQL databases is converted (to apply the changes you made to the selected archive fields). In a CISAM environment, the archive control file (for all companies) is converted, if it already exists.

Copying a document type

You would typically use this procedure when you need to customize a standard document type. You copy a standard document type and then you customize it and save it as a new document type. You can also copy a custom document type, if required.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. Select the document type you want to copy in the Document Types pane and select (Change > Type) from the Edit menu.

  3. Select Copy from the Edit menu, then select Yes.

    A (2) is added by default to the original type description, as the document type name.

  4. Change the document type name, if required.

    [Note]

    The document type name must exist in the IMPSRA.IMP file before you can save the document type.

  5. Customize the copied document type.

    You can change the XML and XSD files linked to the document type, as well as the selected archive fields.

  6. Save your changes.

    The new document type's details are saved to the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file. In a SQL environment, the SRS archive control table for the document type is created in all the valid SQL databases in your environment.

    [Note]

    You will receive an error message if the document type name you have used has not yet been added to the IMPSRA.IMP file.

Deleting a custom document type

You would typically use this procedure to delete a custom document type (a new document type or a customized standard document type) if the document type is not in use anymore.

[Note]

You cannot delete standard document types.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. From the Document Types pane select the custom document type and select (Delete > Type) from the Edit menu.

    The custom document type is deleted from the Document Types pane and from the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file.

Re-indexing the archiving control table

You would typically use this procedure to improve the performance of the Document Archive Viewer programs. The index on the archive control table can reduce the amount of time it takes for the Document Archive Viewer program to display the archived documents that satisfy the custom filters.

This procedure only applies to a SQL environment.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. From the Document Types pane select the document type and select (Change > Type) from the Edit menu.

  3. Select Reindex Archive Control Table from the Options menu.

Saving the selected archive fields

You would typically use this procedure:

  • to enable archiving of documents of a specific document type. If you do not follow this procedure before printing these documents, then the documents are not archived, even if you did select the Archive document option within the document template configuration. This applies to CISAM and SQL environments.

  • when you receive an error message Invalid or missing archive control table in a SQL environment.

  1. Open the SRS Document Print Setup program (SYSPRO ribbon bar > Setup > Stationery Formats > SRS Document Setup).

  2. From the Document Types pane select the custom document type and select (Change > Type) from the Edit menu.

  3. Select the archive field in the Available Archive Fields pane and select Assign Selected.

    [Note]

    Every document type has mandatory archive fields that are selected by default. These fields cannot be removed. You can optionally define more archive fields.

  4. Save your changes.

    The Save and Close option is only enabled if:

    • there is not an existing entry for the document type in the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file.

    • if you have changed any of the selected archive fields.

    The document type details are saved to the ..\Base\ReportingCustomized\ReportMenu\Documentmenu.xml control file. In a SQL environment, the SRS archive control table for the document type has also been created in all the valid SQL databases in your environment.