conditional report generation