Implement @LINE@ script in print format item (#1280)
This commit is contained in:
parent
190240ae4c
commit
5d15bcf3ff
|
@ -1306,7 +1306,7 @@ public class DataEngine
|
|||
if (expression == null || expression.length() == 0)
|
||||
return "";
|
||||
|
||||
log.info("Analyzing Expression " + expression);
|
||||
if (log.isLoggable(Level.CONFIG)) log.config("Analyzing Expression " + expression);
|
||||
String token;
|
||||
String inStr = new String(expression);
|
||||
StringBuffer outStr = new StringBuffer();
|
||||
|
@ -1351,6 +1351,17 @@ public class DataEngine
|
|||
Object value = ((PrintDataElement)tokenPDE).getValue();
|
||||
outStr.append(value);
|
||||
}
|
||||
else if (token.equals("LINE"))
|
||||
{
|
||||
BigDecimal value = Env.ONE;
|
||||
if (m_summarized.containsKey(pdc))
|
||||
{
|
||||
value = ((BigDecimal)m_summarized.get(pdc)).add(value);
|
||||
m_summarized.remove(pdc);
|
||||
}
|
||||
m_summarized.put(pdc, value);
|
||||
outStr.append(value);
|
||||
}
|
||||
|
||||
inStr = inStr.substring(j+1, inStr.length()); // from second @
|
||||
i = inStr.indexOf('@');
|
||||
|
|
Loading…
Reference in New Issue