Thursday 26 March 2015

SCCM 2012 How to create basic report


How to create SRS Reports::

 

It is similar to Basic SCCM 2007 ASP reports; Step by step on how to 
From sccm console under Monitoring


Select SQL based Report


click on Next



This will open Report Builder

Now we have to set SQL Datasets 


If you have already existing Dataset you can use else we have to write it



We have to add the SQL Query

Once Sql query pasted click on OK...
in my case my SQL Query is ...

declare @olddcm datetime
declare @oldhinv datetime
set @oldDCM=DATEADD(DAY,-3, getdate())
set @oldHinv=DATEADD(DAY,-3, getdate())
select sys1.netbios_name0
,lgm.name0 [Name of the local Group]
,lgm.account0 as [Account Contained within the Group]
, lgm.category0 [Account Type]
, lgm.domain0 [Domain for Account]
, lgm.type0 [Type of Account]
, case when ws.lasthwscan < @oldhinv then 'Last Hinv might be out of date'
when cs.lastcompliancemessagetime < @olddcm then 'CI evaluation might be out of date'
when ws.lasthwscan < cs.lastcompliancemessagetime then 'CI evaluated since hinv, not necessarily unreliable'
else 'Recent CI Eval, Hinv since CI Eval = Fairly Reliable'
end as [Reliability of Information]
from
v_gs_localgroupmembers0 lgm
join v_gs_workstation_status ws on ws.resourceid=lgm.resourceid
join v_r_system_valid sys1 on sys1.resourceid=lgm.resourceid
left join v_CICurrentComplianceStatus cs on cs.resourceid=lgm.resourceid
left join v_LocalizedCIProperties_SiteLoc loc on loc.ci_id=cs.ci_id
where loc.displayname = 'local group members into WMI With logging'
order by sys1.netbios_name0, lgm.name0, lgm.account0




and select Table or Matrix option to get a report style 




Move the Required Data fields to Values so that it would be very simple.. Like we have it in SCCM 2007 ASP based reports... 


And finally Remove below options to get created Report and click next


Once report created Just save it so that it will be hosted on SRS server and can be accessed from sccm console


Note:- the above report for local groups and Membership Custom Report

No comments:

Post a Comment