Success!

Wrote content to file ($filename).

The file can be viewed at this URL: http://www.qlrmanager.com/demo/reports/example_6.html.