nKognito
nKognito

Reputation: 6363

iReport and external objects

I am trying to use an external objects in my report.

  1. I added the jar file with external objects to iReport classpath (in settings)
  2. The static text (with I18n)
msg($R{pdf.invoice.finalTitle}, $P{invoice.number})
  1. I have added such definitions into xml:
<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

Answers (1)

bchetty
bchetty

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

Related Questions