Use
The columnNames array contains an entry for each field that is to be displayed in a separate column in a report.
The columnNames array is defined as follows in the model report, CATS_REPORT_01:
private String[] columnNames = {Z_WORKDATE,
Z_POSID,
Z_POST1,
Z_CATSHOURS,
};
The Z_WORKDATE (date of entry), Z_POSID (WBS element), and Z_CATSHOURS (number of hours) fields are contained in the CATS notebook data records. The Z_POST1 field (text describing the WBS element) originates from a picklist and is not contained in the data records.
Prerequisites
You have created your own report based on the model report, CATS_REPORT_01.
Procedure
if (columnNames[j].equals(Z_POST1)) {
try {
IPicklist picklist = timeSheetReader.getPicklist(Z_POSID);
String rproj = catsRecord.getFieldAsString(Z_POSID);
ITableReadOnly picklistRecords = picklist.select(rproj, rproj);
if (picklistRecords.getRowCount() != 0) {
String rprojDescription =
picklistRecords.getRecordReadOnly(0).getFieldAsString(Z_POST1);
aContext.setValue(RECORDLIST, rprojDescription, index);
}
} catch (Throwable e) {
}