Im trying to customise the report to make a Grand Total at the end of the report.
While trying to do this I’ve encounters a “bug” :
The total “Cumul Annuel Totalajout” (In the screen circle in green) is not exported in the CSV.
My main goal, at the end, is to sum every “Cumul Annuel Totalajout” to make a grand total. But for now I just want to know how I can add this to the CSV ?
A PR is a Pull Request, it’s when somebody proposes a change to the code in our repository, and then we have to decide if we “pull” it into the product or not, merging the proposed changes with existing code.
Are you using an IDE to develop? Do you have Xdebug set up? If not, I challenge you to try it, it will increase your quality and productivity tremendously. It is also great for learning, since you can track through the flow of SuiteCRM code and see where it’s going, inspect variables, etc.
The problem is that the total is looping for all the data, without taking the GROUP_BY in consideration.
So it make like a grand total of everything.
For the PDF, it makes every group, one by one, by calling build_report_html() every time / group (so it make a total of the group, not a grand total.)
That’s why the PDF working great, I need to make the exact same thing for the CSV. By calling build_report_csv() every group, and make the total of the group.
I’d love to jump into this and write the function for you, it would actually count as a fun time for me (geek!) but I’m afraid I just don’t have the time.
It shouldn’t be too difficult, maybe try to get some help in a programming website if needed… it’s just a PHP routine to grab SQL results and dump them in text…
Do you have a solution to override AOR_Report.php ? I’ve created /SuiteCRM/custom/modules/AOR_Reports/ with all the file but it wont take my AOR_Report.php, it take the original file (wich I have to edit every update…)
Is there a way to override it like the views file for exemple, wich are working ! My /SuiteCRM/custom/modules/AOR_Reports/views/view.detail.php is correctly working ! but /SuiteCRM/custom/modules/AOR_Reports/AOR_Report.php not ahah
Fatal error: Cannot declare class AOR_Report, because the name is already in use in …/htdocs/SuiteCRM/custom/modules/AOR_Reports/AOR_Report.php on line 1896
Re done a QR&R and it work… without changing anything… Thanks for the help as always !
One last question : If during an update, the original file (/modules/AOR_Reports/AOR_Report.php) is changed, with new stuff/code, what is going to happen ?
I will not have this new code cause it take my custom php file ?
I guess you can push it there also, yes. I don’t use Reports a lot so I don’t know exactly what people need in that module, but hopefully others might comment on your contribution. Thanks