@Martin Salas I have accomplished similar using
Standard:
Type = SO
Main Line = False
Shipping Line = False
Tax Line = False
Summary:
Sum, Formula (Numeric), is 1, case when({item.name}='Item A' OR {item.name}='Item B') then 1 else 0 end
Now use Group for Transaction Name and Transaction Number in the output column.
You can also use this same formula in the Results so that you can view what's going on.