Custom Reporting Data Source (Basic)
  • 25 Jan 2022
  • 1 Minute to read
  • Dark
    Light

Custom Reporting Data Source (Basic)

  • Dark
    Light

Version 7.x .NET Architecture Change

Overview

Report data sources can be easily created for use in Decisions by tagging public classes that return an array with an attribute.

SDK examples such as Simple Custom Data Sources are available for download on the Decisions Public GitHub Repository.

Example

This example will demonstrate how to create a custom Data source using the SDK.

  1. Create a new Class Library project.
  2. Decorate the class with the [AutoRegisterMethodsOnClassAsReportSources(true, "Custom Data Sources")] attribute. This attribute will automatically register any public method that returns an array as a reporting data source.

    Create a public method in the class that returns the data should be available for reporting data source. It must return an array of data that will be used to populate reports. The name of the method will become the name of the data source. The inputs of the method (if any) will become inputs of the data source in the Decisions Report Designer.


  3. After the method is written, build the project and deploy the code into Decisions.
    To learn more, see SDK Basics.
  4. After deploying the code, log into Decisions and create a new report. The data source is now listed along with other data sources. If the method has input data, set the value of that data by selecting the data source then entering data in the properties on the right. 



Was this article helpful?