Hi Pietro,
The only difference between my report and the one you provided to me earlier is that in the case where sod.spn_auto_key <> sod.spn_auto_key2 a new line will be created.
But instead of two columns containing both salesperson1 and salesperson2, I condensed both salesperson1 with salesperson2 into one column. When salesperson 1 = salesperson 2, the distinct value will remove the 2nd line therefore leaving you with only one line for salesperson 1.
In the case where salesperson 1 <> sales person 2, there will be two lines but with this time the distinct value will not remove the 2nd line leaving you with a line for both salesperson 1 and salesperson 2.
Calculation-wise, I took the liberty of replacing all the fields in your formulas (Unless I messed something up everything should have stayed the same). But instead of fields like salesperson1.salesperson_code <> salesperson2.salesperson_code, I replaced it with so_detail.spn_auto_key <> so_detail.spn_auto_key2.