Addig code to generate a report file.