--- title: "Attaching files to a dox42 report" slug: "attaching-files-to-dox42-report" description: "Learn how to attach documents and images to reports in D365 FSCM, enhancing your dox42 reports and email communications effectively." tags: ["d365fscm", "task", "FSCM V2.0.0.2"] updated: 2026-09-17T09:36:18Z published: 2026-09-17T09:36:18Z canonical: "help.dox42.com/attaching-files-to-dox42-report" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.dox42.com/llms.txt > Use this file to discover all available pages before exploring further. # Attaching files to a dox42 report You can attach a document or an image to a report in D365 FSCM, for example, to a sales order. This attachment can then be printed on the dox42 report or added to a generated e-mail. ## Step 1: Setting up in D365 FSCM ### Steps 1. Mark the desired dox42 report and select the **Attachments** button. ![Report setup interface showing SSRS reports and attachment options for document generation.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_Attachments1.png) Report setup in D365 FSCM 2. Create a new attachment and fill out the following fields: 1. It is possible to enable and disable an attachment type. The related data defines where the attachment will be attached. For example, in this case on the header (to set up the related tables, use the **Related data button**. If there are no records by default see: [No records in related data for dox42 reports](/v1/docs/no-records-in-related-data-for-dox42-reports)). 2. The **Type** dropdown defines the file type of the attachment. 3. If the **Add to report data source** checkbox is set to **Yes**, the files will be available in the report data source. 4. If the **Attach to email** checkbox is set to **Yes**, the files will be attached to a generated email when using the “Email” printing destination. ![Settings for file attachments in the Sales Confirmation module of Finance and Operations.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_new_Attachment.png) Attachment configuration 3. Create an attachment. ![Sales order management interface displaying various customer accounts and order statuses.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_standard_view.png)![Document preview showing details of the dox42 Server file attachment for sales orders.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_Attachments2.png) ### Result If the report is now printed, the attachment will be shown in the dox42 report. ## Step 2: Setting up in the dox42 FSCM Module After setting up the new **Attachment data** in D365 FSCM, the data source will be available for the report in the dox42 FSCM Module. ![D365 FSCM report data source configuration for SalesConfirm and AttachmentData table fields.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_AttachmentsDataSource.png) **AttachmentData** data source The **Base64Data** data field contains the attached file for the report as a Base64 encoded string. To show the file in the report design, you need to add the new dynamic field to the data source. ### Steps 1. In Word go to the **dox42** ribbon and select **Data Map.** ![Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/setting-up-the-d365-fscm-data-sources-image-6me2xixz.png) **dox42** ribbon The **Data Map Designer** window opens. 2. Select the **Attachment data** data source. 3. Select the **Dynamic Field** button. The **Dynamic Field** window opens. 4. Enter a name. 5. Enter the following Visual Basic Code: `result = System.Convert.FromBase64String(AttachmentData.Base64Data)` ![Data Map Designer interface showing dynamic field and D365 FSCM report options.](https://cdn.document360.io/3acc69da-1de2-431d-95a6-08ae83717b4a/Images/Documentation/D365FSCM_AttachmentsDataField(1).png) Example configuration for an Attachment Data Field 6. Select **OK**. 7. Select **File > Save** to save the changes to the Data Map. ### Result You have created a dynamic field for an attachment that you can [insert](/v1/docs/inserting) via the **dox42 Data Fields** explorer.