}
private void setReportConfigParameters( final MasterReport report, final IPentahoResultSet values ) {
int rowCount = values.getRowCount();
int colCount = values.getColumnCount();
ModifiableConfiguration config = report.getReportConfiguration();
if ( colCount >= 2 ) {
IPentahoMetaData md = values.getMetaData();
int nameIdx = md.getColumnIndex( "name" ); //$NON-NLS-1$
int valIdx = md.getColumnIndex( "value" ); //$NON-NLS-1$
if ( nameIdx < 0 ) {
nameIdx = 0;
}
if ( valIdx < 0 ) {
valIdx = 1;
}
for ( int i = 0; i < rowCount; i++ ) {
Object[] aRow = values.getDataRow( i );
if ( ( aRow[nameIdx] != null ) && ( aRow[valIdx] != null ) ) {
config.setConfigProperty( aRow[nameIdx].toString(), applyInputsToFormat( aRow[valIdx].toString() ) );
}
}
} else {
error( Messages.getInstance().getErrorString( "JFreeReport.ERROR_0025_INVALID_REPORT_CONFIGURATION_PARAMETERS" ) ); //$NON-NLS-1$
}