Using the OCR Reference Interface

You can use Payment Management's OCR reference interface to create OCR-strings for use with customer documents such as invoices and reminders.

For more information on how to create and use dependencies see Microsoft Docs (search for Dependencies).

Setting up an OCR interface

  1. Use the Search for page or report icon and search for Sales & Receivables Setup.

  2. On the Sales & Receivables Setup page under the FastTab General, ensure that the OCR Reference Type is defined.

  3. Use the Search for page or report icon and search for Company Information.

  4. On the Company Information under the FastTab Payments, ensure that the Bank Creditor No. is defined.

  5. Create an app or add functionality to an existing app, having the following dependencies

    Dependencies

    The dependency for Payment and Reconciliation Formats (DK) is needed to get the Bank Creditor No. from the Company Information.
    The dependency for Payment Management is needed to generate the payment ID.

  6. Add a procedure to the report (or any other place of your choice).
    To be able to print an OCR reference, a functionality must be added to a report. For simplicity the procedure can be added directly in the report. The following example uses a posted sales invoice and the standard Word report layout from Business Central.
    The procedure creates an OCR reference that consists of:

  • The OCR Reference type from the Sales & Receivables Setup
  • The OCR reference based on the Document No.
  • The Bank Creditor No. from the Company Information

    In the report add the following procedure:

    Procedure

    Please note that If you are using a version of Payment Management that does note contain the OCR Reference Type on the Sales & Receivables Setup you can hardcode the OCR Reference Type.
    The procedure returns an OCR reference looking as the example below:

    +71<000000010319200+12345678<

    The procedure can be modified according to customer requirements.
  1. Add a variable to the report of data type text to hold the OCR reference and call the procedure.

  2. Add a call to the procedure by assigning the new variable with the return value from the procedure.

    Procedure.

  3. Add a new column to the dataset to be able to use the variable in the report layout.

    Procedure.

  4. Add the OCR reference to the layout. The OCR reference is a part of the reports dataset and can be added to the layout. This can be done regardless of the layout format (RDLC or Word). Identify the variable holding the OCR reference and place it in the layout. See this example of a Word layout.

  5. Print the report and verify that the OCR reference is created. See this example of a printed report.