Custom Reporting Data Filters
- 24 Aug 2021
- 1 Minute to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Custom Reporting Data Filters
- Updated on 24 Aug 2021
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
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 bool that specifies whether or not this report filter should show up as a selectable filter in the report designer. If your filter applies only to a specific data source, this is where you will specify that restriction:
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?