--- title: "Custom Report Connector" slug: "bc-custom-report-connector-devkit" tags: ["BC", "BIS", "Business Central", "Business Integration Solutions", "Task"] updated: 2026-06-25T09:59:07Z published: 2026-06-25T09:59:07Z canonical: "docs.staedean.com/bc-custom-report-connector-devkit" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Custom Report connector > [!NOTE] > **Note** > > This is a legacy version to extend the attachment generator on premise. Please refer to [Extending Attachment Generation](/business-central/docs/bc-extending-attachment-generation-overview) for the current version. Support will not drop for this feature before version 20 (expected Spring 2022). ## Custom Report connector (on premise) A Custom Report Connector enables customizations while generating a report attachment. A Custom Report Connector is an extension point of the [ATTACHMENTGENERATOR activity.](/business-central/docs/bc-attachmentgenerato-activity) Use it to implement customizations for report attachments. The concept is a custom codeunit plugged into the standard framework without changing the standard code. Standard Microsoft Dynamics 365 Business Central programming skills are sufficient for writing a Custom Report Connector. The custom codeunit implements a function with the following fixed name and arguments: | Name | Description | | --- | --- | | OnPrintReport | This trigger executes before the attachment adds to the message. Use it to generate a report attachment with custom code. In this trigger you have access to the Record ID of the message currently being processed. Example uses: print all due invoices for a specific customer or date. | > [!NOTE] > **Note** > > The function must have the same name and arguments. A runtime error occurs when the function name or arguments do not match. ## Related - [Extending attachment generation: overview](/bc-extending-attachment-generation-overview.md) - [ATTACHMENTGENERATOR activity](/bc-attachmentgenerator-activity.md) - [Set up the Attachment generator activity](/bc-set-up-the-attachment-generator-activity.md)