When you use the query data does it by default pull the report number from the last submitted form? Or is that specified in this bit of code?
"Set ReportNumber For Other"
Condition: Number of occurences of ReportNumber != 0 and DocumentName is blank
Action: Set a field's value: ReportNumber = ...