Custom Reporting Data Filters
- 14 Oct 2022
- 1 Minute to read
- Print
- DarkLight
Custom Reporting Data Filters
- Updated on 14 Oct 2022
- 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 filter the data returned by the data source.
To use a custom reporting data filter, a class must 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 appear as a selectable filter in the Report designer. The Applies method allows 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?