[ 2871042 ] Activity Control Report - broken report

https://sourceforge.net/tracker/?func=detail&atid=934929&aid=2871042&group_id=176962

Also i have modified DataEngine to give us proper error message in future, when we will have columns with displayType=Table but no Reference Value
This commit is contained in:
teo_sarca 2009-10-01 05:30:14 +00:00
parent 66f09fd9c5
commit 8eaac67d66
3 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import java.util.ArrayList;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MLookupFactory;
import org.compiere.model.MQuery;
import org.compiere.model.MRole;
@ -354,6 +355,11 @@ public class DataEngine
log.warning(ColumnName + " - virtual column not allowed with this Display type");
continue;
}
if (AD_Reference_Value_ID <= 0)
{
log.warning(ColumnName + " - AD_Reference_Value_ID not set");
continue;
}
TableReference tr = getTableReference(AD_Reference_Value_ID);
String display = tr.DisplayColumn;
// => A.Name AS AName, Table.ID,
@ -702,6 +708,9 @@ public class DataEngine
*/
public static TableReference getTableReference (int AD_Reference_Value_ID)
{
if (AD_Reference_Value_ID <= 0)
throw new IllegalArgumentException("AD_Reference_Value_ID <= 0");
//
TableReference tr = new TableReference();
//
String SQL = "SELECT t.TableName, ck.ColumnName AS KeyColumn," // 1..2

View File

@ -0,0 +1,4 @@
-- Oct 1, 2009 8:26:29 AM EEST
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_DATE('2009-10-01 08:26:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53810
;

View File

@ -0,0 +1,4 @@
-- Oct 1, 2009 8:26:29 AM EEST
UPDATE AD_Column SET AD_Reference_ID=19,Updated=TO_TIMESTAMP('2009-10-01 08:26:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53810
;