Custom button in Reports Module

Hi all, I've seen that there was a similar question asked 2 years ago with no response.
Now I'm here with the same question: how to adding a custom button in reports detail view?
In particular I want to put an "XLS Export" button just below "Export" button in Detail View. A workaround is to insert button in /modules/Reports/templates/templates_reports.php but it's not a best practise of course.
So which is the way for doing this in a upgrade-safe mode?
Thank you.

Adriano

  • I found a solution!

    Just add row below to /custom/modules/Reports/views/view.classic.php

    public function display()
    {

    echo '<script type="text/javascript" src="custom/modules/Reports/javascript/ExportXLS.js"></script>';
    echo '<button onclick="ExportXLS()">Export XLS</button>';
    parent::display();
    $this->action = $GLOBALS['action'];
    }

    I think this isn't a best practice, but it works.