Error: Template IF condition is not balanced correctly - Condition: IF @doreport