Custom Reporting Data Source (Basic)
  • 24 Aug 2021
  • 1 Minute to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Custom Reporting Data Source (Basic)

  • Dark
    Light

Article summary

Overview

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

Custom SDK examples, such as the Simple Custom Data source example below, are located on the Decisions Public GitHub Repository.

Example

  1. Create a new Class Library project and add a reference to the DecisionsFramework.dll.  
  2. The class is decorated with the following attribute: [AutoRegisterMethodsOnClassAsReportSources(true, "Custom Data Sources")]. This attribute will automatically register any public method that returns an array as a reporting data source.
  3. 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.

  4. After the method is written, build the project and deploy the code into Decisions.
    To learn how to deploy the code into Decisions, see Getting Started in Visual Studio


  5. After deloying the code, log into Decisions and create a new Report to view the custom 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?