Custom Reporting Data Filters
  • 24 Aug 2021
  • 1 Minute to read
  • Dark
    Light

Custom Reporting Data Filters

  • Dark
    Light

Article Summary

Overview

Custom Reporting Data Filters involve deciding which rows to include and are used in conjunction with custom data sources. Usually, a custom report filter will apply only to a specific custom data source. This filter can be used to filter the data that is returned by the data source.

To use a custom reporting data filter, a class will need to be created that inherits from and implements AbstractCustomFilter. The class will also need the AutoRegisterReportElement attribute for it to show up in the Decisions Report Designer.


The Applies method returns a boolean that specifies whether or not this report filter should show up as a selectable filter in the report designer. The Applies method also allows for a created filter to only apply to a specific data source.

 public override bool Applies(ReportDefinition definition)
{
    if (definition.UsesCustomDataSource())
    {
        foreach (ICustomReportDataSource dataSource in definition.GetCustomDataSources())
        {
            if (dataSource is SampleCustomDataSource)
            {
                return true;
            }
        }
    }
    return false;
}

Was this article helpful?