jschoone
Posts: 359
Score: 25 Joined: 4/10/2004 From: Norway Status: offline
|
Hi!! First you have to be sure all parameters are available to the drilldown report. That means that the parent report must include the collectionID in the returned records too! SELECT ID AS [BulletinID],Title, sum(case when LastStateName='No Status' then 1 else 0 end) as 'No Status', sum(case when LastStateName='Waiting' then 1 else 0 end) as 'Waiting', sum(case when LastStateName='Retrying' then 1 else 0 end) as 'Retrying', sum(case when LastStateName='Failed' then 1 else 0 end) as 'Failed', sum(case when LastStateName='Uninstalled' then 1 else 0 end) as 'Uninstalled', sum(case when LastStateName='Preliminary Success' then 1 else 0 end) as 'Preliminary Success', sum(case when LastStateName='Reboot Pending' then 1 else 0 end) as 'Reboot Pending', sum(case when LastStateName='Install Verified' then 1 else 0 end) as 'Install Verified', 100 * sum(case when LastStateName='Install Verified' then 1 else 0 end)/Count(*) as '% Compliant', LocaleID, UpdateID, CollectionID FROM v_GS_PatchStatusEx JOIN v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_GS_PatchStatusEx.ResourceID WHERE v_FullCollectionMembership.CollectionID = @CollID GROUP BY ID,Title, LocaleID, UpdateID, CollectionID HAVING Count(*) > 10 ORDER BY BulletinID DESC The new report based on the collectionID and the UpdateID should list all resources in the collection that have a patch state other than 'Install verified'. It should look something like this: SELECT DISTINCT ID AS [BulletinID],Title, Language, InfoPath FROM v_ApplicableUpdatesSummaryEx WHERE UpdateID = @PatchID SELECT NetBios_Name0, AD_Site_Name0, User_Name0, Operating_System_Name_and0, LastStateName FROM v_GS_PatchStatusEx JOIN v_FullCollectionMembership ON v_FullCollectionMembership.ResourceID = v_GS_PatchStatusEx.ResourceID AND LastStateName!='Install Verified' LEFT JOIN v_R_System ON v_R_System.ResourceID = v_GS_PatchStatusEx.ResourceID WHERE v_FullCollectionMembership.CollectionID = @CollID AND v_GS_PatchStatusEx.UpdateID = @PatchID ORDER BY Netbios_Name0 and has two prompts; one for the collectionID and one for the Software Update ID. Hope this helped to create a report about the client status. Jan
|