How to: Configure VAT Reports

Before you can create VAT reports, you must specify which processes must be used to print or export the reports.

Important

In order to configure these processes, you must be familiar with C/AL development and understand how codeunits work in Microsoft Dynamics NAV. If you are not familiar with codeunits, you must consult with your Microsoft Dynamics NAV certified partner.

VAT Report Configuration Codeunits

The VAT report configuration in Microsoft Dynamics NAV takes place in codeunits. At the center of the configuration is codeunit ID 740 that works as a mediator that can be called from different objects and pass data around without these objects knowing of each other.

In codeunit ID 740, you can specify which codeunits must run when users want to print or export a VAT report. By following a mediation design pattern, the VAT Report window calls codeunit ID 740, and Microsoft Dynamics NAV then reads how to print or export. You can add additional functions in this codeunit, but the following table describes the preconfigured functions. For each function, you can specify one or more codeunits or reports to handle actual process.

Function Description

GetLines

Specifies which process to run when a user wants to import VAT entries into the VAT Report window.

Export

Specifies which process to run when a user wants to export a VAT report from the VAT Report window in order to submit it to the tax authorities.

Release

Specifies which process to run when a user has printed or exported a VAT report so that it must be marked as released.

Reopen

Specifies which process to run when a user wants to resubmit an existing VAT report in order to make a correction.

Print

Specifies which process to run when a user wants to print a VAT report from the VAT Report window.

If you have multiple report formats, you can write a CASE statement to run the appropriate process depending on the user’s selection of menu item.

Microsoft Dynamics NAV comes with default values for each function, but you can change these to suit your needs. For example, if your company wants to submit a VAT report that is printed in a specific format or on specific paper, for example, then you can edit the Print function in codeunit 740 to point to a report object that you create. This way, you will not have to edit the VAT Report window object to access your report because the menu item on the window always just calls codeunit 740 to run whatever the Print function specifies.

In the standard version of this codeunit, more functions exist to handle other pieces of functionality. For example, you can change the default implementation to print using a different report, or to accept other values for the VAT Report Config. Code field.

To configure VAT reports

  1. In the Microsoft Dynamics NAV Development Environment, open Object Designer.

  2. Open codeunit 740 in design mode.

  3. Identify the function for the activity that you want to configure, such as the Print function, and make the appropriate changes.

When users create a VAT report, and they choose to print it, the report will print in the format that is defined by your report object, My VAT Report.

Preconfigured Codeunits

In your country/region, Microsoft Dynamics NAV can have been modified to change the way VAT reports work. As with other functionality, you can modify relevant tables and reports and create new objects, and you can modify the preconfigured codeunits to include your modifications.

The following table describes the predefined codeunits in Microsoft Dynamics NAV that configure VAT reports.

ID Name Description

740

VAT Report Mediator

Central codeunit for configuring activities that are related to VAT reports. Based on the mediation pattern, other objects will refer to this codeunit to trigger the code that carries out the activity.

741

VAT Report Release/Reopen

Handles the code for marking a VAT report as released or reopened.

743

VAT Report Export

Handles the code for exporting a VAT report into a file format such as XML or plain text so that the file can be submitted to the tax authorities.

744

VAT Report Check

Handles the code for testing if the current VAT report is set up correctly.

Users will not be able to submit VAT reports that fail the validation that is specified in this codeunit.

See Also

Concepts

VAT and VIES Report Setup