Customize - build_report_csv -AOR_Reports

Is it possible to customize AOR_Reports upgrade safe?

I tried to customize build_report_csv in custom/modules/AOR_Reports/AOR_Reports.php but is never called.
I found this in the forum


so it seams that is not possible to customize ?

Hey,

Are you still having issues with this?

From the Post you’ve linked, it does indeed look like its currently not possible to customize reports in an upgrade safe way

Do you get any errors in the suitecrm.log that might point towards anything helpful?

It may also be worth raising this as a suggestion on the SuiteCRM Github repo, if such a ticket doesn’t already exist :slight_smile:

I wonder if it could be made with this technique:thinking:

excuse my ignorance.
I’ve already try this and it didn’t work because unlike the article that you share, that it create a call to the new object, in my situation i can’t do that.

I want to make changes to the function build_report_csv, this function will always be call by any report that you want to export.
If I’m not able to overwrite the function how can I call the new one in AOR_ReportCustom?

I don’t know - never tried it.

But the general idea is…

Easy:

  1. Create a AOR_ReportCustom object that extends AOR_Report.
  2. In your object override build_report_csv

Hard:
3. Now you just need a way to cause the code to instantiate a AOR_ReportCustom object, instead of a AOR_Report object.

This is like a new customization problem, different from the original one you had. It might (also) not be possible. It depends on where (and how) the bean object is instantiated. Do you know where that is happening?