Create documents in docx, xlsx (MS Office Word and Excel), odt, ods (LibreOffice and OpenOffice) and pdf format without MS Office or others plugins installed from any module and subpanel using templates.
#3255 - Excel/Spreadsheet features
Hi,
First of all, thanks for developping such a nice module !
I'm asking whether the following features exist, or are on your roadmap. Both concerns spreadsheet generation. (Excel or ODS) (1) Add a SORT mode based on a column (E.g. sort by date ASC) (2) Advanced CELL FORMATING such as background or font color based on conditions (E.g. BG=RED if NbVALUE<0)
Thanks in advance
Ando
4 years ago
Hi Ando,
Thank you for your support :)
(1) The order of the records from the listview is the same as that in which the records are being shown, provided that the option "Select all" is not checked. For special sorting of the records it should be done by code (both for the main data and for the sub-panels). You can see answers regarding record sorting in these cases: - https://store.suitecrm.com/support/mail-merge-reports/1539 - https://www.sugaroutfitters.com/support/mail-merge-reports/468 - https://www.sugaroutfitters.com/support/mail-merge-reports/917
(2) This would be an advanced template composition issue. MMR uses the TinyButStrong and OpenTBS libraries to generate the documents from the template. You can try to create fields with conditional formatting in the template with the field definition explained here https://www.tinybutstrong.com/forum.php?thr=2662 , although we cannot guarantee that it will work correctly.
Regards
3 years ago
As the plugin reads the template for which field values or related fields to grab, sorting would have to be done within the template but I have looked into TBS for sometime now and it doesn't look like the template engine provides any syntax for sorting.
but there maybe a systemwide sort you can do (always by date modified for example) from looking at the plugin some logic will need to be inserted into the modules/DHA_PlantillasDocumentos/Generate_Document.php file around line 1902 there is a variable around there called $related_beans which should contain related records before their values are read. I would try applying sorting to this variable before it is processed further.