public interface ICognosReportRow extends java.lang.Iterable<ICognosReportColumnValue>
//iterate over the row values
for (ICognosReportColumnValue columnValue : iCognosReportRow) {
System.out.print(columnValue.getColumnName()+": " + columnValue.getValue()+", ");
}
{
@code
BigDecimal userid = (BigDecimal) iCognosReportRow.getColumnValue(0).getValue();
String username = (String) iCognosReportRow.getColumnValue(1).getValue();
Short enabled = (Short) iCognosReportRow.getColumnValue(2).getValue();
System.out.println("userid: " + userid + ", username: " + username + ", isenabled: " + enabled);
}
The ICognosReportColumnValue.getValue() method returns an object
whose type is determined by the data type contained in the report
metadata for that column. You can cast to the appropriate type.
| Modifier and Type | Method and Description |
|---|---|
ICognosReportColumnValue |
getColumnValue(int columnIndex)
Returns the column value for the specified column.
|
ICognosReportColumnValue |
getColumnValueByName(java.lang.String columnName)
Returns the column value for the specified column name.
|
ICognosReportColumnValue getColumnValueByName(java.lang.String columnName)
ICognosReportRowReader.getOutputMetaData() for more information.columnName - (required)
name of the column from the Cognos report outputICognosReportColumnValue getColumnValue(int columnIndex)
columnIndex - (required)
index of the column from the Cognos report output
Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights -
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.