diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 040d806898..57db71d31b 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2880,19 +2880,19 @@ function reporting_group_report($report, $content) $return['data'] = []; - $events = events_get_agent( - false, - $content['period'], - $report['datetime'], - false, - true, - false, - false, - false, - false, - $content['id_group'], - true - ); + $id_group = groups_safe_acl($config['id_user'], $content['id_group'], 'ER'); + + if (empty($id_group)) { + $events = []; + } else { + $sql_where = sprintf(' AND id_grupo IN (%s) AND estado<>1 ', implode(',', $id_group)); + $events = events_get_events_grouped( + $sql_where, + 0, + 1000, + is_metaconsole() + ); + } if (empty($events)) { $events = []; diff --git a/pandora_console/include/functions_reporting_html.php b/pandora_console/include/functions_reporting_html.php index f859eb8f32..07ec0977ea 100644 --- a/pandora_console/include/functions_reporting_html.php +++ b/pandora_console/include/functions_reporting_html.php @@ -1920,11 +1920,7 @@ function reporting_html_group_report($table, $item, $pdf=0)