help with report
Posted in 2006
I'm having trouble on a 4GL report getting a bill-to and ship-to customer address retrieved from the database. I need help with what the select statement should look like and how to read more than one cursor into the report. Here is the table that contains the customer addresses. The same table has the ship-to and bill-to addresses. ar_altname an_customer integer Ship-to Alternate Customer number an_cust integer Bill-to Customer Master Number **Ties to ar_customer.cust_customer** an_name_addr char(90) Customer name & address, packed form If ar_altname.an_customer = ar_altname.an_cust then an_name_addr is a bill-to If ar_altname.an_customer <> ar_altname.an_cust then an_name_addr is a ship-to I have one cursor already selecting records for the report and it selects from table ar_altname based on the ship-to, ar_altname.an_customer. So what I need to do is if the ship-to and bill-to columns don't equal then take the bill-to number that is returned and do another select statement where that bill-to is equal to the ship-to. Do I need another cursor for this select statement? How do I pass the value of the customer number from one select to the other and how do I read two cursors into the same report?