rewrite to allow creation of Report instances directly, and to write as XML