Setting up the dox42 template for electronic reporting

Prev Next

All the data sources, including input parameter, connection Excel file, Crypto, Entity “Dox42ReportStorageLastRecordsV3_SF” with Last TransactionID are set up the same way as for a SRSS report.

Step 1: Getting the report’s metadata

  1. Go to the reports and select the needed report.

  2. Select View > Original preview to generate the report.

  3. Go to dox42 parameters.

  4. In the Reports tab the following checkboxes in the report’s row should be marked:

    1. Metadata exists

    2. Synchronized

      dox42 parameters setup showing report configuration and metadata synchronization options.

      Configured checkboxes in Reports tab

Step 2: Setting up the D365 FSCM Report data source for electronic reporting

  1. In Microsoft Word or Excel, go to the dox42 ribbon and select Data Map.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon

    The Data Map Designer window opens.

  2. Select the D365 FSCM Report button.

    A new window opens.

  3. Electronic Reporting data sources

  4. From the Table dropdown select one of these entries for Electronic Reporting as D365 FSCM Report data source:

    • ERReportData

    • ERReportStaticParameters

    D365 FSCM Report Data Source configuration with highlighted report data table.

    D365 FSCM Report tab

  5. To be able to use Electronic Reporting data in the report design, add a new dynamic field  to the data source.
    This field contains Electronic reporting data as a Base64 encoded string. This dynamic field is optional and not necessarily required for new dox42 versions.

    Visual Basic code snippet for converting Base64 string to binary data.

    Dynamic field window

    Data Map Designer interface showing dynamic field selection and various data sources options.

    Data Sources tab

  6. Optional: Set up the Filter/Sort for ERReportData table that picks up the file name of the template you need:

    Data Map Designer interface showing filter options for data source configuration.

    Filter/Sort for ERReportData table

Step 3: Parsing report data

  1. As soon as we decided to use Excel as a report output in the ER configuration format, we can now copy this template file from D365 to the folder on the dox42 Server for the next data source configuration purposes:

    Highlighted file 'DataSource_Example.xlsx' in a folder view on a computer.

    Excel file in dox42Server folder

  2. We further use the dox42 Excel data source to read this file:

    1. In Word or Excel, go to the dox42 ribbon and select Data Map.

      Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

      dox42 ribbon

      The Data Map Designer window opens.

    2. Select the Excel button.

    3. Select the Pick Excel button and select the Excel file.

      Data Map Designer interface showing Excel file selection and data source options.

      Excel window

    4. Select the Data Source Output tab.

    5. Select the button from the Data Range text field to select  a data range of the fields that you are going to use in a template

    6. Select the First Row of Selected Range contains Column Names checkbox.

    7. Select the Read until first empty cell checkbox in the first row.

      Excel data output settings with highlighted data range and column names options.

      Data Source Output tab

       

  3. Go to the Data source tab

  4. Select the Load Excel from Data field checkbox.

  5. Select the FileData dynamic field from ERReportData table.
    For new dox42 versions you can directly choose the original field Base64Data the dynamic field is not necessarily required, the conversion will be done automatically.

  6. From the Format dropdown select the XLSX entry.

    Settings for loading an Excel file in the data source configuration interface.

    Data source tab

  7. Delete the content of the File text field.

    Excel data source configuration with highlighted file selection and options for data initialization.

    Data source tab

  8. Select OK.

Note

In our example the ER configuration has two tables with Header and Lines and our Excel template file contains data on 2 separate Excel sheets.

A screenshot of a computer screen  Description automatically generated

Separate Excel sheets for Header and Line

For more convenience create two separate Excel data sources the data map for Header and Lines data:

Data Map Designer interface showing various data sources and highlighted Excel data sources.

Separate Excel data sources

Result

You have set up dox42 document template for electronic reporting. Now you can start designing your templates and insert Data Fields.

Invoice details including account, address, and line amounts are highlighted for clarity.

Adding the data fields to the document template

Invoice document detailing sales information, including account, address, and item details.

Generated report