Hello,
I've got the following situation: I've developed a little extension, which lets me set the width of a table in the list-view of a report. The reason is, that I got a report with plenty of columns, but even in the result-view the columns would be super squished, so nothing useful can be read in the report. The solution was to tinker with the css of the report table to allow the table to be a lot wider while the extra columns on the right can be viewed when scrolling with a horizontal scrollbar. This solution works so far, however I now face the following problem:
I apply the new css via a custom detail and result view (so one for the small table in the report detail view and one for the result-view) where I overwrite the afterRender method. In this overwritten afterRender method I apply the css. However when I refresh the data via the refresh button, the table gets rerendered without triggering my modified afterRender function (which in turn resets my custom css) .
That itself wouldn't be a big issue, since iIusers to just refresh the page instead of using the refresh button. However when I sort the columns, the table also gets rerendered without triggering my afterRender. And here I cant just reload the entire page, since that would reset the sort of the columns.
I've now tried to also overwrite the refresh-function and apply my custom css there, with no success however. Upon inspecting the code in module-advanced.js a bit closer I figured out, that the refresh function is part of the view "advanced:views/report/reports/base" (so the base view).
I've tried overwriting the baseview in the same manner as I overwritten the detail and result view with my customview, but without any success:

it seems the baseview is not meant to be overwritten.
I also tried my luck by trying a viewSetupHandler to execute my customcode through that, but according to the documentation https://docs.espocrm.com/development...etup-handlers/ the result-view-type is not support with viewSetupHandler, only these types:
Any help would be greatly appreciated
I've got the following situation: I've developed a little extension, which lets me set the width of a table in the list-view of a report. The reason is, that I got a report with plenty of columns, but even in the result-view the columns would be super squished, so nothing useful can be read in the report. The solution was to tinker with the css of the report table to allow the table to be a lot wider while the extra columns on the right can be viewed when scrolling with a horizontal scrollbar. This solution works so far, however I now face the following problem:
I apply the new css via a custom detail and result view (so one for the small table in the report detail view and one for the result-view) where I overwrite the afterRender method. In this overwritten afterRender method I apply the css. However when I refresh the data via the refresh button, the table gets rerendered without triggering my modified afterRender function (which in turn resets my custom css) .
That itself wouldn't be a big issue, since iIusers to just refresh the page instead of using the refresh button. However when I sort the columns, the table also gets rerendered without triggering my afterRender. And here I cant just reload the entire page, since that would reset the sort of the columns.
I've now tried to also overwrite the refresh-function and apply my custom css there, with no success however. Upon inspecting the code in module-advanced.js a bit closer I figured out, that the refresh function is part of the view "advanced:views/report/reports/base" (so the base view).
I've tried overwriting the baseview in the same manner as I overwritten the detail and result view with my customview, but without any success:
it seems the baseview is not meant to be overwritten.
I also tried my luck by trying a viewSetupHandler to execute my customcode through that, but according to the documentation https://docs.espocrm.com/development...etup-handlers/ the result-view-type is not support with viewSetupHandler, only these types:
- list – main list view;
- detail – main detail view;
- edit – main edit view;
- record/list – list record view;
- record/search – search view;
- record/detail – detail record view;
- record/edit – detail record view;
- record/kanban – kanban record view;
Any help would be greatly appreciated

Comment