my ( $sql, $offset, $limit, $sql_params, $report_id ) = @_;
$sql_params = [] unless defined $sql_params;
my $report = Koha::Reports->find($report_id) if $report_id;
my $report = $report_id ? Koha::Reports->find($report_id) : undef;
my $report_name = $report ? $report->report_name : 'Unknown report';
# check parameters
-