I have the following queries to format addresses in a report connected to a Postgres database. This is the first time I'm trying to use the syntex formatAddr and don't fully understand how it works. Is this a function in Postgres or the report. I took this from an existing report and when I take out the country (which I don't want as part of the address displayed) then the complete address does not display at all.
Code:
formatAddr(invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, ( invchead_billto_city || ' ' || invchead_billto_state || ' ' || invchead_billto_zipcode ), invchead_billto_country) AS f_billtoaddress,
This is the complete query
Code:
SELECT
--Due Date
formatDate(determineDueDate(invchead_terms_id, invchead_invcdate)) AS due_date,
--Discount Date
formatDate(determineDiscountDate(invchead_terms_id, invchead_invcdate)) AS dis_date,
--remitto.*,
remitto_name,
formatAddr(remitto_address1, remitto_address2, remitto_address3, remitto_citystatezip, remitto_country) AS remitto_adr,
invchead_invcnumber AS invoicenumber,
formatDate(invchead_invcdate) AS f_invoicedate,
cust_number,
invchead_billto_name,
formatAddr(invchead_billto_address1, invchead_billto_address2, invchead_billto_address3, ( invchead_billto_city || ' ' || invchead_billto_state || ' ' || invchead_billto_zipcode ), invchead_billto_country) AS f_billtoaddress,
invchead_billto_phone,
invchead_shipto_name,
formatAddr(invchead_shipto_address1, invchead_shipto_address2, invchead_shipto_address3, ( invchead_shipto_city || ' ' || invchead_shipto_state || ' ' || invchead_shipto_zipcode ), invchead_shipto_country) AS f_shiptoaddress,
invchead_ordernumber AS ordernumber,
invchead_ponumber,
formatDate(invchead_orderdate) AS f_orderdate,
formatDate(invchead_shipdate) AS f_shipdate,
invchead_fob, terms_descrip, invchead_shipvia
FROM remitto, cust, invchead, terms
WHERE ( (invchead_cust_id=cust_id)
AND (invchead_terms_id=terms_id)
AND (invchead_id=<? value("invchead_id") ?>) )
ORDER BY ordernumber;