How to validate report selections in Business Central

Recently I had to validate some filter selections on a report in Business Central and found out it was not so straight forward to do. What happened when using the trigger OnPreDataItem() or trigger OnPreReport() triggers was that I was able to validate the filter selections by user but the user experience was not optimal since the selection page closed when the validation error occured.

Source : D365 BC & Power Apps
Read more…