Changed frontend to show runnable SQL on edit report page. Implemented generation of runnable SQL too.