-
Notifications
You must be signed in to change notification settings - Fork 0
Address structure
Create a new variable for the role of the agent to be used in the address:
Go to View > Variables
Name the variable e.g. addressRole
Set the variable in Variable Expression, include "" to ensure it will work in the script
Each Element of the address also needs to have a variable created for it. These follow the same structure:
Name element: ((edu.ku.brc.specify.config.Scriptlet)$P{REPORT_SCRIPTLET}).getByLoanAgentRole($F{Loan_Number},$V{addressRole},"agent.Title")
Address element: ((edu.ku.brc.specify.config.Scriptlet)$P{REPORT_SCRIPTLET}).getByLoanAgentRole($F{Loan_Number},$V{addressRole},"address.address")
The last element of each is the table.fieldName this needs to be changed to match the field name of the relevant element.
This is entered in to the Variable Expression Field.
In the Initial Value Expression enter "".
.
In the document enter the following into the Text Field box:
($V{agentTitle}==""?"":$V{agentTitle}+" ")+($V{agentFirstName}==""?"":$V{agentFirstName}+" ")+($V{agentLastName}==""?"":$V{agentLastName}+"<br/>")
+($V{addressAddress}==""?"":$V{addressAddress}+"<br/>")
+($V{addressAddress2}==""?"":$V{addressAddress2}+"<br/>")
+($V{addressAddress3}==""?"":$V{addressAddress3}+"<br/>")
+($V{addressAddress4}==""?"":$V{addressAddress4}+"<br/>")
+($V{addressAddress5}==""?"":$V{addressAddress5}+"<br/>")
+($V{addressState}==""?"":$V{addressState}+"<br/>")
+($V{addressPostalCode}==""?"":$V{addressPostalCode}+"<br/>")
+($V{addressCountry}==""?"":$V{addressCountry})