I am getting a null result when calling AdminOrder.getFormattedTotalIncTax() using the JasperReports scriptlet below. I can see proper values in the orders_totals table.
The parameter and field values have been verified. For example, I passed an incorrect sessionId at one point and received a stack trace (as expected).
Any help is appreciated,
Bob
---------------------- JasperReports scriptlet method ----------------------------
public String getFormattedTotals() throws JRScriptletException {
String formattedTotals = null;
KKAdminIf kkEngine = (KKAdminIf)this.getParameterValue("kkAdminEng.class");
String sessionId = (String) this.getParameterValue("sessionId");
Integer orderId = (Integer)this.getFieldValue("orders_orders_id");
AdminOrder adminOrder;
try {
adminOrder = kkEngine.getOrderForOrderId(sessionId, orderId.intValue());
} catch (KKAdminException e) {
throw new RuntimeException(e);
}
formattedTotals = adminOrder.getFormattedTotalIncTax();
return formattedTotals;
}
Looks like getFormattedTotalIncTax() is deprecated.