final CSVWriter lm = new CSVWriter();
lm.setSeparator(separator);
lm.setWriteDataRowNames(writeDataRowNames);
lm.setWriter(getWriter());
final Configuration config = getReport().getReportConfiguration();
lm.setWriteStateColumns(CSVProcessor.queryBoolConfig(config, CSVProcessor.CSV_WRITE_STATECOLUMNS));
lm.setEnableReportHeader(CSVProcessor.queryBoolConfig(config, CSVProcessor.CSV_ENABLE_REPORTHEADER));
lm.setEnableReportFooter(CSVProcessor.queryBoolConfig(config, CSVProcessor.CSV_ENABLE_REPORTFOOTER));
lm.setEnableGroupHeader(CSVProcessor.queryBoolConfig(config, CSVProcessor.CSV_ENABLE_GROUPHEADERS));
lm.setEnableGroupFooter(CSVProcessor.queryBoolConfig(config, CSVProcessor.CSV_ENABLE_GROUPFOOTERS));