diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index 2e56ebdb6b..62be2fd693 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -170,8 +170,9 @@ public class DataEngine tableName = rs.getString(2); // TableName reportName = rs.getString(3); // Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ] - String whereClause = "(" + rs.getString(4) + ")"; + String whereClause = rs.getString(4); if (!Util.isEmpty(whereClause)) { + whereClause = "(" + whereClause + ")"; // IDEMPIERE-2597 if (whereClause.indexOf("@") == -1) { queryCopy.addRestriction(whereClause); } else { // replace context variables