[fix bug 940277] [fix bug 931068] Active report template and view.

* Build the UI fro viewing reports.
* Build the back-end for viewing reports.