Reporting question (Full Version)

All Forums >> [Management Products] >> Microsoft Systems Management Server >> SMS 2003



Message


landrew -> Reporting question (10/13/2008 12:11:48 PM)

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




okis14 -> RE: Reporting question (10/14/2008 12:29:36 PM)

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




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.75