I have written a function in one of my reports. I get the error message "Element ST_ADDR is undefined in ADDRESS." when I try to run the report. My funtion looks like:
<cfargument name="ss" required="yes"/>
<CFSET variables.BoxNo = ''>
<cfquery name="qmailbox" dbtype="ODBC" datasource='#session.ds#'>
SELECT address.st_addr, address.type
FROM address
WHERE address.type = 'Campus' and address.soc_sec = '#arguments.ss#'
</cfquery>
<cfif qmailbox.recordcount gt 0>
<cfset variables.BoxNo = address.st_addr>
</cfif>
<cfreturn variables.BoxNo>
It is possible that there might not be a address.type of 'Campus' for every record passed to this function, that hy I check recordcount. I am open to any suggestions you have.
Thanks