sub save_report {
my ( $borrowernumber, $sql, $name, $type, $notes, $cache_expiry, $public ) = @_;
$cache_expiry ||= 0;
my $dbh = C4::Context->dbh();
$sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/
my $query =
-