IDEMPIERE-1702 Incorrect report result when there are more than 2 print formats with different report view where clause
This commit is contained in:
parent
8b256677d0
commit
e060114381
|
@ -138,6 +138,7 @@ public class DataEngine
|
||||||
*/
|
*/
|
||||||
public PrintData getPrintData (Properties ctx, MPrintFormat format, MQuery query, boolean summary)
|
public PrintData getPrintData (Properties ctx, MPrintFormat format, MQuery query, boolean summary)
|
||||||
{
|
{
|
||||||
|
MQuery queryCopy = query.deepCopy();
|
||||||
|
|
||||||
/** Report Summary FR [ 2011569 ]**/
|
/** Report Summary FR [ 2011569 ]**/
|
||||||
m_summary = summary;
|
m_summary = summary;
|
||||||
|
@ -167,7 +168,7 @@ public class DataEngine
|
||||||
// Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ]
|
// Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ]
|
||||||
String whereClause = rs.getString(4);
|
String whereClause = rs.getString(4);
|
||||||
if (!Util.isEmpty(whereClause))
|
if (!Util.isEmpty(whereClause))
|
||||||
query.addRestriction(whereClause);
|
queryCopy.addRestriction(whereClause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
|
@ -196,11 +197,11 @@ public class DataEngine
|
||||||
if (hasVT)
|
if (hasVT)
|
||||||
{
|
{
|
||||||
tableName += "t";
|
tableName += "t";
|
||||||
format.setTranslationViewQuery (query);
|
format.setTranslationViewQuery (queryCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
PrintData pd = getPrintDataInfo (ctx, format, query, reportName, tableName);
|
PrintData pd = getPrintDataInfo (ctx, format, queryCopy, reportName, tableName);
|
||||||
if (pd == null)
|
if (pd == null)
|
||||||
return null;
|
return null;
|
||||||
loadPrintData(pd, format);
|
loadPrintData(pd, format);
|
||||||
|
|
Loading…
Reference in New Issue