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
  1. Open the report "Application deployment status" from under "Software Distribution - Application Monitoring - Hidden" (Details View shows hidden items) in Report Builder.
  2. Scroll right and click the cell that currently contains [Total], this is a textbox named Total.
  3. Edit the Action property by clicking the elipsis "...".
  4. 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.

The first report is now finished. When you click on a number under the Assets column you are now sending that EnforcementState parameter to the details report, if you just tried it you certainly get an error. The details report doesn't know what to do with this parameter.

  1. Open the report "Application deployment detailed status" from under "Software Distribution - Application Monitoring - Hidden"
  2. Right-click on Parameters and click Add Parameter
  3. 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)
  4. Expand Datasets and right-click on DataSet1 and select Dataset Properties
  5. 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.

WHERE
  (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.