DrillDown report didn't work because of two bug

Description

I built the summary report (for example, the number of products produced in the shop per day).
Then I want to look at the details for each product - what documents it was produced (JasperReport).
I'm drill down by clicking on the special reference and ... nothing.
This is because two bugs.

1. ZkReportViewer.java.
private void executeDrill (MQuery query, Component component)
— new WReport (AD_Table_ID, query, component, 0);
+++ new WReport (AD_Table_ID, query, component, m_WindowNo); //adding lost m_WindowNo

2. WReport.java
private void launchReport (MPrintFormat pf)
There is some code here:
int Record_ID = 0;
if (m_query.getRestrictionCount()==1 && m_query.getCode(0) instanceof Integer)
Record_ID = ((Integer)m_query.getCode(0)).intValue();

Problem is Record_ID is always been 0, because m_query.getCode(0) always been instanceof String.

Instead of the code above, I suggest writing:

try {
if (m_query.getRestrictionCount()==1)
Record_ID = Integer.parseInt(m_query.getCode(0).toString());
}
catch (NumberFormatException e) {
log.info(e.getMessage());
}

After the changes mentioned above, my drilldown report is work fine.

Environment

None

Assignee

Carlos Ruiz

Reporter

Денис Кузнецов

Labels

None

Tested By

None

Components

Affects versions

Priority

Major
Configure