Perfect. I already have the secondary collection prompt query working. Just 
needed that main query. Thanks!

From: [email protected] [mailto:[email protected]] On 
Behalf Of Beardsley, James
Sent: Wednesday, October 08, 2014 12:35 PM
To: [email protected]
Subject: [mssms] RE: All computers for a user collection

I'm not sure I understand exactly what you're asking but I think you're wanting 
to create a report that shows Computer Name, User ID and limited to a specific 
collection, but where you can prompt for a collection. Is that right? I'm not 
very good at writing SRS reports so I can't help you with the prompt but this 
query below can be run in SQL studio to essentially do the same thing, just 
substitute the collection ID.

SELECT DISTINCT
                     sys.Name0 'Asset Tag',
                     sys.User_Name0 'User ID'
FROM                v_R_System sys
LEFT OUTER JOIN      v_R_User USR ON USR.User_Name0 = SUBSTRING(sys.User_Name0, 
CHARINDEX('\', sys.User_Name0) + 1, LEN(sys.User_Name0))
WHERE               USR.Unique_User_Name0 in (select SMSID from 
_RES_COLL_<COLLECTIONID>)
ORDER BY             sys.Name0


From: [email protected] [mailto:[email protected]] On 
Behalf Of Poole, Richard
Sent: Wednesday, October 08, 2014 1:56 PM
To: [email protected]
Subject: [mssms] All computers for a user collection

Hello everyone,

So I've tried using many of my current reports, that use collection membership 
to display properties for a group of systems, with user collections to no 
avail. To make it simple, just a query that displays the system name and user 
name, with v_R_System joined to v_FullCollectionMembership=@CollectionID. What 
changes to the query/parameter need to be made to make the collection switch, 
or is there one?

Thank you,
Richard 
Poole<https://www.mcpvirtualbusinesscard.com/VBCServer/richardpoole/card>



________________________________

Confidentiality Notice: This e-mail is intended only for the addressee named 
above. It contains information that is privileged, confidential or otherwise 
protected from use and disclosure. If you are not the intended recipient, you 
are hereby notified that any review, disclosure, copying, or dissemination of 
this transmission, or taking of any action in reliance on its contents, or 
other use is strictly prohibited. If you have received this transmission in 
error, please reply to the sender listed above immediately and permanently 
delete this message from your inbox. Thank you for your cooperation.




Reply via email to