myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Reporting question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> Reporting question Page: [1]
Login
Message << Older Topic   Newer Topic >>
Reporting question - 10/13/2008 12:11:48 PM   
landrew

 

Posts: 43
Score: 1
Joined: 6/16/2005
Status: offline
Hi all,

does anyone have a report that would allow a count of computer models per site (Where the site is input via prompt)?

I've tried a number of variations on the theme with no particular joy, and nobody has put this anywhere that I can find to plagerise it yet ;)

Reporting never has and never will be my strong point so apologies if this is straight forward.

Thanks as always,

Lee
Post #: 1
RE: Reporting question - 10/14/2008 12:29:36 PM  1 votes
okis14

 

Posts: 29
Score: 3
Joined: 12/28/2006
Status: offline
Assuming you mean SMS site and not AD site then you can use this.  If you want AD site you can change the view and column names.
Appologize in advance for any typos. 


select distinct model0 as 'Model', count(model0) as 'Model Count'
from dbo.v_gs_computer_system gscs
join dbo.v_ra_system_smsinstalledsites rass on gscs.resourceid = rass.resourceid
where sms_installed_sites0 = @variable
group by model0
order by 'Model Count'


Then create a prompt within the report.  The name must be called variable or you can name it what you want but change the @variable above.

begin
if (@__filterwildcard = '')
select distinct sms_installed_sites0 from dbo.v_ra_system_SMSInstalledSites
order by sms_installed_sites0
else
select distinct sms_installed_sites0 from dbo.v_ra_system_SMSInstalledSites
Where sms_installed_sites0 like @__filterwildcard
order by sms_installed_sites0
end

(in reply to landrew)
Post #: 2
Page:   [1]
All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003 >> Reporting question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.266