Expression Error

Hi,

Is there a way to stop "expression error" from appearing on documents if the field is blank. I've noticed that it won't print "expression error" if the sex is not selected.

I'd like to have this happen if the 'supplier person' first name: [openvpms:get(party:getPatientReferralVet(.),'firstName')] is blank.

Thanks,

Greta

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Expression Error

Either:

1. party:getPatientReferralVet(.) is not returning a vet, so the call:

     openvpms:get(party:getPatientReferralVet(.),'firstName') 

    is being made without a valid object.

2. party:getPatientReferralVet(.) is returning a Veterinary Practice, which doesn't have a firstName field

 

If the problem is 1, you'd have to change the report template to suppress display if the field was in error.

This is only available to jasperreports. Its not supported in Word of OpenOffice templates.

If its 2, you can:

  • use the 'name' field instead; or
  • add a dummy hidden firstName field to party.supplierVeterinaryPractice i.e.:
          <node name="firstName" path="/details/firstName" type="java.lang.String"
              minCardinality="0" hidden="true" readOnly="true">
        </node> 
 

-Tim

Syndicate content