Clear all

[Solved] How can I exclude a column on csv generation of a report?  



I want to exclude certain column to be present visually in the user interface but excluded from the exported CSV.  How can I achieve that?

1 Answer

Via @isingh  :


  • If this is your own report then you can do this by adding the ReportExportListenerClass element for your report, i.e. <ReportExportListenerClass mode="CSV" labelKey="global/generateCsv"></ReportExportListenerClass>


  • Or you can achieve this using report override, i.e. add following to your .rptoverride

<ReportEventListenerClassOverridemode="CSV" labelKey="global/generateCsv"></ReportEventListenerClassOverride>


Override the beginTableResult and in that, remove or mark the field hidden


Sample code -


  public void beginTableResult(ITableMeta tableMetaIn) throws TableResultListenerException {

    FieldDef fieldMail = FieldDefFactory.createAdHocFieldDef(AlertInboxSearchReportListener.MAIL, CoreFieldType.STRING, false);

    int columnIndexMail = tableMetaIn.getColumnIndex(fieldMail.getFieldRef());





© 2020 One Network Enterprises. All rights reserved. Privacy Policy