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',
 
vendor/composer/autoload_static.php
files.md5
vendor/composer/autoload_classmap.php

 

We have tried following this question but no success. 

https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/4362/report-filters---dates-prior-to-current-month

 Any suggestions on on this implementation?

Parents
  •  

    It appears that you are using a version of Sugar prior to version 12.1.x The user interface for Reports was updated in Sugar 12.1.x. You might want to wait to make your changes until you upgrade to the latest release. 

  • 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 :

    modules/Reports/templates/templates_modules_def_js.php
    include/generic/SugarWidgets/SugarWidgetFielddatetime.php

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

    custom/modules/Reports/templates/templates_modules_def_js.php.

    custom/ include/generic/SugarWidgets/SugarWidgetFielddatetime.php

    custom/Extension/modules/Reports/Ext/Language/en_us.langreports.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 -
     custom/modules/Reports/templates/templates_modules_def_js.php

    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.

Reply
  • 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 :

    modules/Reports/templates/templates_modules_def_js.php
    include/generic/SugarWidgets/SugarWidgetFielddatetime.php

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

    custom/modules/Reports/templates/templates_modules_def_js.php.

    custom/ include/generic/SugarWidgets/SugarWidgetFielddatetime.php

    custom/Extension/modules/Reports/Ext/Language/en_us.langreports.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 -
     custom/modules/Reports/templates/templates_modules_def_js.php

    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.

Children