I have searched previous posts and FAQs, but have not been able to find this problem, so I apologize if there is one out there that I've missed.
I'm using CR 8.5, DB2 db via ODBC.
We produce customer statements that combine multiple accounts on each statement. I've got two tables: COMBLEAD for the primary account and customer information for that account, and COMBSEC for the secondary accounts on the statement with their customer information. These two tables are linked by {lead_acct}.
I need to identify customers that are listed in the secondary account table but not in the primary table, for each lead acct.
Example:
COMBLEAD
lead_acct cust_name
123 John
123 Mary
123 Joe
COMBSEC
lead_acct sec_acct cust_name
123 456 Susan
123 456 Mary
I'd like my results to show all customers in COMBLEAD, and only Susan from COMBSEC, since she has no relationship to the lead account.
I've tried a couple of different ways, and right now I've got a main report displaying the lead account and customer information, grouped by {lead_acct}; and a subreport displaying the secondary account information, also grouped by {lead_acct}.
Is there any way to only display the customers in the subreport that have no record in the main report, evaluated for each group? Maybe a subreport isn't the way to go?
Thanks in advance for any help.
I'm using CR 8.5, DB2 db via ODBC.
We produce customer statements that combine multiple accounts on each statement. I've got two tables: COMBLEAD for the primary account and customer information for that account, and COMBSEC for the secondary accounts on the statement with their customer information. These two tables are linked by {lead_acct}.
I need to identify customers that are listed in the secondary account table but not in the primary table, for each lead acct.
Example:
COMBLEAD
lead_acct cust_name
123 John
123 Mary
123 Joe
COMBSEC
lead_acct sec_acct cust_name
123 456 Susan
123 456 Mary
I'd like my results to show all customers in COMBLEAD, and only Susan from COMBSEC, since she has no relationship to the lead account.
I've tried a couple of different ways, and right now I've got a main report displaying the lead account and customer information, grouped by {lead_acct}; and a subreport displaying the secondary account information, also grouped by {lead_acct}.
Is there any way to only display the customers in the subreport that have no record in the main report, evaluated for each group? Maybe a subreport isn't the way to go?
Thanks in advance for any help.