diff --git a/code/ReportAdmin.php b/code/ReportAdmin.php index 37650814..1b1be86b 100755 --- a/code/ReportAdmin.php +++ b/code/ReportAdmin.php @@ -126,6 +126,22 @@ class ReportAdmin extends LeftAndMain { return false; } + /** + * Get the current report + * + * @return SSReport + */ + public function CurrentReport() { + $id = isset($_REQUEST['ID']) ? $_REQUEST['ID'] : Session::get('currentReport'); + + if($id) { + foreach($this->Reports() as $report) { + if($id == $report->ID()) return $report; + } + } + return false; + } + /** * Return a Form instance with fields for the * particular report currently viewed. diff --git a/templates/SSReportTableField_printable.ss b/templates/SSReportTableField_printable.ss new file mode 100644 index 00000000..20b68052 --- /dev/null +++ b/templates/SSReportTableField_printable.ss @@ -0,0 +1,26 @@ + + +
+ +<% base_tag %> +