Whenever I try to use data from joined tables the CFXML blows
up. To be more specific when I add the #CustName# to the CFXML
output it all stops working. I have tried just about everything but
cannot get this to work. The query runs flawlessly in any other
instance.
Any suggestions would be greatly appriciated.
I have a very simple query:
SELECT HeaderID, MasterID, Invoice, InvoiceNo,
InvoiceDate, Header.CustID, CustName FROM Header
left Join Customer on header.custid = customer.custid
WHERE header.HeaderID = #SearchInfo#
ORDER BY InvoiceDate DESC
Here is my CFXML code:
<cfxml variable="invoiceXML">
<Customer>
<cfoutput query="myquery">
<Invoices>
<InvoiceNo>#InvoiceNo#</InvoiceNo>
<HeaderID>#HeaderID#</HeaderID>
<InvoiceAmount>#numberformat(InvoiceAmount,
"999,999.99")#</InvoiceAmount>
<InvoiceDate>#DateFormat(InvoiceDate,"mmm-dd-yyyy")#</InvoiceDate>
<CustID>#CustID#</CustID>
<CustName>#CustName#</CustName>
</Invoices>
</cfoutput>
</Customer>
</cfxml>
<cfoutput>#invoiceXML#</cfoutput>