Only generating reports when  is defined.