IDEMPIERE-1071 Problem with using Report in tab Export Format Line
This commit is contained in:
parent
58610b535e
commit
b1b6d8ba0b
|
@ -634,10 +634,11 @@ public class MLookupFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder embedSQL = new StringBuilder("SELECT ");
|
StringBuilder embedSQL = new StringBuilder("SELECT ");
|
||||||
|
boolean translated = false;
|
||||||
// Translated
|
// Translated
|
||||||
if (IsTranslated && !Env.isBaseLanguage(language, TableName))
|
if (IsTranslated && !Env.isBaseLanguage(language, TableName))
|
||||||
{
|
{
|
||||||
|
translated = true;
|
||||||
if (isValueDisplayed)
|
if (isValueDisplayed)
|
||||||
embedSQL.append(TableNameAlias).append(".Value||'-'||");
|
embedSQL.append(TableNameAlias).append(".Value||'-'||");
|
||||||
embedSQL.append(TableName).append("_Trl.").append(DisplayColumn);
|
embedSQL.append(TableName).append("_Trl.").append(DisplayColumn);
|
||||||
|
@ -660,16 +661,19 @@ public class MLookupFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
embedSQL.append(" WHERE ");
|
embedSQL.append(" WHERE ");
|
||||||
|
|
||||||
|
int Column_ID = MColumn.getColumn_ID(BaseTable, BaseColumn);
|
||||||
|
MColumn column = MColumn.get(Env.getCtx(), Column_ID);
|
||||||
// If is not virtual column - teo_sarca [ 1739530 ]
|
// If is not virtual column - teo_sarca [ 1739530 ]
|
||||||
if (! BaseColumn.trim().startsWith("("))
|
if (!column.isVirtualColumn())
|
||||||
{
|
{
|
||||||
embedSQL.append(BaseTable).append(".").append(BaseColumn);
|
embedSQL.append(BaseTable).append(".").append(BaseColumn);
|
||||||
|
embedSQL.append("=").append(TableNameAlias).append(".").append(KeyColumn);
|
||||||
|
} else if (translated) {
|
||||||
|
embedSQL.append(TableNameAlias).append(".").append(BaseColumn).append("=").append(column.getColumnSQL());
|
||||||
|
} else {
|
||||||
|
embedSQL.append(BaseColumn).append("=").append(column.getColumnSQL());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
embedSQL.append(BaseColumn);
|
|
||||||
}
|
|
||||||
embedSQL.append("=").append(TableNameAlias).append(".").append(KeyColumn);
|
|
||||||
|
|
||||||
return embedSQL.toString();
|
return embedSQL.toString();
|
||||||
} // getLookup_TableEmbed
|
} // getLookup_TableEmbed
|
||||||
|
|
|
@ -406,6 +406,7 @@ public class DataEngine
|
||||||
.append(lookupSQL).append(" AS ").append(ColumnName).append(",");
|
.append(lookupSQL).append(" AS ").append(ColumnName).append(",");
|
||||||
groupByColumns.add(m_synonym+display);
|
groupByColumns.add(m_synonym+display);
|
||||||
groupByColumns.add(lookupSQL);
|
groupByColumns.add(lookupSQL);
|
||||||
|
orderName = m_synonym + display;
|
||||||
//
|
//
|
||||||
TableReference tr = getTableReference(AD_Reference_Value_ID);
|
TableReference tr = getTableReference(AD_Reference_Value_ID);
|
||||||
String foreignColumnName = tr.KeyColumn;
|
String foreignColumnName = tr.KeyColumn;
|
||||||
|
|
Loading…
Reference in New Issue