Custom Filters in Reports

We are working on Reports implementation to add new report filters for the date filters as shown in the below link.

We are able to copy the code from  include/generic/SugarWidgets/SugarWidgetFielddatetime.php to custom/ include/generic/SugarWidgets/SugarWidgetFielddatetime.php and the code is reflecting in backend.

When we are trying to add front end implementation in custom/modules/Reports/templates/templates_modules_def_js.php the code is accepting the below path modules/Reports/templates/templates_modules_def_js.php and changed the file path for the require once in custom/modules/Reports/Report.php but in below files we have to change to custom directory.

When we added the code in main directory and it has worked as shown in screenshot.

Report' => __DIR__ . '/../..' . '/modules/Reports/Report.php',
 './modules/Reports/Report.php' => '104571b868105eb003804dd3126f7caa',
 'Report' => $baseDir . '/modules/Reports/Report.php',


We have tried following this question but no success.

 Any suggestions on on this implementation?

Parents Reply Children
  • Hi Jeff, we picked this back up finally after upgrading. We are now on 13.0 but still experiencing the same issue. 

    We are working on Reports implementation to add new date filters Before_today and before_month.

    We have implemented code in 2 filepaths :


    We are getting the desired output but to make the upgrade safe, we imprinted the code in custom folders :


    custom/ include/generic/SugarWidgets/SugarWidgetFielddatetime.php


    The code is not reflecting in the 12 version, when we are trying to imprint the template file from sugar modules to custom modules.

    From - modules/Reports/templates/templates_modules_def_js.php
    To -

    As per our earlier discussion, we tried to test the package in the latest version 13.0.0 but we are trying to upload the package, it’s throwing an error - sugar is restricting access to a few functions when we are trying to override the template file code through custom modules.

    Kindly suggest any optimal solution to access template file code in the custom folder.