How can i write an expression/query so it’s possible to search on multiple suppliers? Right now my Quick Report only works when one supplier is searched on.
See image:
Quick Report
select sig.supplier_id
, sig.name AS "Supplier Account Name"
, sia.address_id
, sia.name AS "Supplier Name"
, sia.country
, sia.address
, sia.address1
, sia.address2
, sia.address3
, sia.zip_code
, sia.city
, se.buyer_code
, PURCHASE_BUYER_API.GET_NAME(se.BUYER_CODE) AS "Buyer Name"
, PURCHASE_CODE_API.Get_Description(se.PURCHASE_CODE) AS "Supplier Category"
, cm.name
, cm.description
, cm.method_id
, cm.value
, cm.method_default
, cm.address_default
, cm.valid_from
, cm.valid_to
from supplier_info_general sig
left outer join supplier_info_address sia on sig.supplier_id = sia.supplier_id
left outer join supplier_ent se on sig.supplier_id = se.supplier_id
left outer join comm_method cm on sig.supplier_id = cm.identity
--Below are my search criterias
WHERE (Report_sys.Parse_parameter(sig.supplier_id, '&SupplierID') = 'TRUE' or '&SupplierID' is null)
and (UPPER(sia.name) like UPPER('&SupplierName') or UPPER('&SupplierName') is null)
and (UPPER(PURCHASE_BUYER_API.GET_NAME(se.BUYER_CODE)) like UPPER('&BuyerID') or UPPER('&BuyerID') is null)
and (UPPER(PURCHASE_CODE_API.Get_Description(se.PURCHASE_CODE)) like UPPER('&SupplierCategory') or UPPER('&SupplierCategory') is null)