Reputation: 6363
I am trying to use an external objects in my report.
msg($R{pdf.invoice.finalTitle}, $P{invoice.number})
<import value="crm.object.objects.Invoice"/>
<parameter name="invoice" class="crm.object.objects.Invoice" isForPrompting="false">
<property name="number" value=""/>
<defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter>
...
But still it fails during compilation with error: net.sf.jasperreports.engine.design.JRValidationException: Report design not valid : 1. Parameter not found : invoice.number
What I am doing wrong? Thank you
Upvotes: 2
Views: 2294
Reputation: 2241
The parameter you have defined is "invoice", not "invoice.number". So, it should be $P{invoice}. You can then access it's variable, if it has enough access privileges...or by it's getter, as $P{invoice}.getNumber()
Upvotes: 2