I have run across an issue where I deploy an application and want to find out what machines haven't finished downloading or installing my application. Clicking "In Progress" in the report shows me 1 "Waiting on Content" and 28 "Waiting for Maintenance Window". When I click either the 1 or 28, I get the list of 29 machines that are "In Progress". No help to me! Well I dug through the code and here's the fix. For the record I'm using SCCM 2012 SP1 CU3.
The issue lies in the query asking for the EnforcementState but ultimately doing nothing with it.
We're going to have to pass the specific EnforcementState to the other report so it can be compared
(AppState.PolicyModelID = @PolicyModelID) AND
(AppState.AssignmentID = @AssignmentID) AND
(AppState.StatusType = @StatusType) AND
(AppState.StatusType = AppState.AppStatusType) AND
(@DT = 0 OR AppState.DTCI = @DT) AND
(AppState.EnforcementState = @EnforcementState)
else if @StatusType = 3
Add this, AND (AppState.EnforcementState = @EnforcementState), to the next WHERE statement as well. Skip the following one, as StatusType 4 is Unknown, and add it to the last WHERE as well. Click OK and save the report. You may have to refresh the page if you're currently viewing this report in your browser but this will now show specifically the assets you wanted to see.
The issue lies in the query asking for the EnforcementState but ultimately doing nothing with it.
We're going to have to pass the specific EnforcementState to the other report so it can be compared
- Open the report "Application deployment status" from under "Software Distribution - Application Monitoring - Hidden" (Details View shows hidden items) in Report Builder.
- Scroll right and click the cell that currently contains [Total], this is a textbox named Total.
- Edit the Action property by clicking the elipsis "...".
- Under the Action node click Add to add a Parameter names EnforcementState and a value of [EnforcementState], this value is already being pulled, but not sent to the detail report until now. Click Ok and save the report.
- Open the report "Application deployment detailed status" from under "Software Distribution - Application Monitoring - Hidden"
- Right-click on Parameters and click Add Parameter
- Name this EnforcementState with a Prompt of EnforcementState, visibility should either be Visible or Hidden (visible only matters when a parameter isn't passed into the report, which ours is passed from the eariler steps)
- Expand Datasets and right-click on DataSet1 and select Dataset Properties
- In the Query pane scroll past the first SELECT, begin, and second SELECT. The area we are changing is in the query's second WHERE section. Add the following to the end: AND (AppState.EnforcementState = @EnforcementState). This will make your WHERE clause look like the following.
(AppState.PolicyModelID = @PolicyModelID) AND
(AppState.AssignmentID = @AssignmentID) AND
(AppState.StatusType = @StatusType) AND
(AppState.StatusType = AppState.AppStatusType) AND
(@DT = 0 OR AppState.DTCI = @DT) AND
(AppState.EnforcementState = @EnforcementState)
else if @StatusType = 3
Add this, AND (AppState.EnforcementState = @EnforcementState), to the next WHERE statement as well. Skip the following one, as StatusType 4 is Unknown, and add it to the last WHERE as well. Click OK and save the report. You may have to refresh the page if you're currently viewing this report in your browser but this will now show specifically the assets you wanted to see.
No comments:
Post a Comment