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?
Via @isingh :
<ReportEventListenerClassOverridemode="CSV" labelKey="global/generateCsv">com.transcendsys.platform.web.report.AlertExportCsvResultListener</ReportEventListenerClassOverride>
Override the beginTableResult and in that, remove or mark the field hidden
Sample code -
@Override
public void beginTableResult(ITableMeta tableMetaIn) throws TableResultListenerException {
FieldDef fieldMail = FieldDefFactory.createAdHocFieldDef(AlertInboxSearchReportListener.MAIL, CoreFieldType.STRING, false);
int columnIndexMail = tableMetaIn.getColumnIndex(fieldMail.getFieldRef());
tableMetaIn.removeColumn(columnIndexMail);
super.beginTableResult(tableMetaIn);
}