Tests and small changes for scheduled reports
Merge pull request #4298 from lwyszomi/scheduled_reports_tests

Tests and small changes for scheduled reports