long ago have posted report on computers with SCCM report for Last logged on computer name with application installed or not and SCCM report display computers with IPaddress based on Application/software
this report gives you computers with ip address and last logged on username from a given collection :
select A.Name0,c.IPAddress0 as 'IP ADDRESS',E.UserName0 as 'Lastlogged user'
from v_R_System A inner join
v_FullCollectionMembership B on
Inner join v_GS_NETWORK_ADAPTER_CONFIGUR C ON
Inner join v_GS_COMPUTER_SYSTEM E ON A.ResourceID=E.ResourceID
where CollectionID=@COLLID and C.IPEnabled0='1' and c.ipaddress0 !='0.0.0.0'
group by A.Name0,c.IPAddress0 ,E.UserName0
Prompt for collection:
Select CollectionID,Name from v_Collection
Note: Please replace the single quotes from your Key board as it might give you syntax error when you do copy/paste.