- $st_reports .= "<tr><td><a href='javascript:showReport($rep_counter)'>" . $report->name . "</a></td></tr>";
- $st_params .= "<table border=0 id='REP_" . $rep_counter++ . "' style='display:none'>";
- $st_params .= "<tr><td>" . $report->getDisplay() . "</td></tr></table>";
+ $acc = access_string($report->name);
+ $st_reports .= "<tr><td><a class='printlink' href='"
+ .$_SERVER['PHP_SELF']."?Class=$class_counter&rep_id=$report->id"
+ ."'$acc[1]>$acc[0]</a><tr><td>\n";
+ if (isset($_REQUEST['rep_id']) && $_REQUEST['rep_id']==$report->id) {
+
+ $action = $path_to_root.'/reporting/prn_redirect.php';
+
+ $st_params = "<table border=0><tr><td>\n"
+ . "<form method='POST' action='$action' target='_blank'>\n";
+ $st_params .= hidden('REP_ID', $report->id, false);
+ $st_params .= submit('Rep'.$report->id,
+ _("Display: ") . access_string($report->name,true),
+ false, '', $pdf_debug==0) . '<br><br>';
+ $st_params .= $report->getDisplay()
+ . "\n</form></td></tr></table>\n";
+ $Ajax->addUpdate(true, 'rep_form', $st_params);
+ }