Skip to main content

Move a template to another company

Copy a template from one company file to another through a file. The export holds the design. It can also hold the code of the data source that feeds the design. The example moves an Invoice template from Alwaha Trading to a second company file.

Before you begin​

  • You need access to both company files, and you open them one after the other.
  • Find the data source of the template. See Advanced printing data sources for how to read the name of the source. In the designer, Change Data Source shows it only when more than one procedure matches the document type.
    • A ready source has a name that ends with _Default, such as prcPrintAR_Bill_Default. Every company file of the same program version has it.
    • A custom source is one that an implementer added to the first file only. See Create a custom data source.
  • Both files should be on the same program version, so the ready sources return the same fields.

Steps​

In the first company file​

  1. Click Management > Procedures > Advanced Reports Management.
  2. Select the template and click Export. The window of the export appears.
  3. Keep or change File Path. The default is the desktop, with the name of the template and the extension .amnarx.
  4. Tick Export Data Source Code only for a custom source. For a ready source leave it cleared.
  5. Click Ok. The program saves the file and a picture of the template with the same name beside it.

In the second company file​

  1. Open the second company file and open Advanced Reports Management.
  2. Click Import and choose the .amnarx file. The window of the import shows Type, Name, Data Source, Right-to-Left Layout and Shared, and a list of errors if there are any.
  3. Change Name if a template of the same type already has it.
  4. If the file holds the code of the data source and that source already exists in this file, clear Replace the data source if it exists.
  5. Click Ok. Preview a document with the new template to check it.

Result​

The template appears in the list of the second file, as yours, with the sharing and direction it had in the file. The exported file does not carry the connection to the first company. The program connects the template to the file that opens it. Your default template does not change: see Template storage, sharing and defaults.

What replace does not do​

Replace the data source if it exists does not replace the procedure. The program creates the procedure from the code in the file. If a procedure of that name is already there, SQL Server refuses, the program shows its error, and the template is not imported. To bring a changed procedure into a file that has an older one, ask your database administrator to remove the old procedure first, then import with the option ticked.

If something goes wrong​

MessageWhy it appearsWhat to do
The data source does not existThe file has no code and the second file has no procedure of that name.Export again with Export Data Source Code ticked.
The template name is already in use. Choose another nameA template of the same type has this name.Type another Name in the window.
The data source name is invalid. It must start with …The data source name is not of the document type of the template.Export the template again from the program.
The template cannot be imported due to the listed errorsThe list shows errors.Read the list and fix each cause.
An SQL Server error textThe procedure exists and the option to replace was ticked, or the code does not run in this file.Clear the option, or ask your database administrator.

This page applies to alameen ERP 10, version 10.1.79.764.