IDEMPIERE-3559 DrillDown report didn't work because of two bug / integrate suggestions from Denis Kuznetsov
This commit is contained in:
parent
fbb260a1ea
commit
b689ad0495
|
@ -167,8 +167,20 @@ public class WReport implements EventListener<Event> {
|
||||||
private void launchReport (MPrintFormat pf)
|
private void launchReport (MPrintFormat pf)
|
||||||
{
|
{
|
||||||
int Record_ID = 0;
|
int Record_ID = 0;
|
||||||
if (m_query.getRestrictionCount()==1 && m_query.getCode(0) instanceof Integer)
|
if (m_query.getRestrictionCount() == 1) {
|
||||||
|
if (m_query.getColumnName(0).equals(m_query.getTableName()+"_ID")) {
|
||||||
|
Object vrec = m_query.getCode(0);
|
||||||
|
if (vrec instanceof Integer) {
|
||||||
Record_ID = ((Integer)m_query.getCode(0)).intValue();
|
Record_ID = ((Integer)m_query.getCode(0)).intValue();
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
Record_ID = Integer.parseInt(m_query.getCode(0).toString());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
log.info(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
PrintInfo info = new PrintInfo(
|
PrintInfo info = new PrintInfo(
|
||||||
pf.getName(),
|
pf.getName(),
|
||||||
pf.getAD_Table_ID(),
|
pf.getAD_Table_ID(),
|
||||||
|
|
|
@ -996,7 +996,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (AD_Table_ID != 0)
|
if (AD_Table_ID != 0)
|
||||||
new WReport (AD_Table_ID, query, component, 0);
|
new WReport (AD_Table_ID, query, component, m_WindowNo);
|
||||||
else
|
else
|
||||||
log.warning("No Table found for " + query.getWhereClause(true));
|
log.warning("No Table found for " + query.getWhereClause(true));
|
||||||
} // executeDrill
|
} // executeDrill
|
||||||
|
|
Loading…
Reference in New Issue