Cannot read property 'indexOf' of undefined

I am working on a survey that will allow field crew to perform inspection. I created the survey from a feature service that is on my sever and have that working fine. The only problem I am having now is when I generate a report based off a custom template for a record. When I go to generate the report I receive this error message:

Cannot read property 'indexOf' of undefined

I did some testing and noticed that it has to do with the images of the survey. When I took those fields out and republished the survey the report worked. However, they need these images within the report. Any ideas on what is causing this error? To go into further detail, I created an attachment to the SDE Table which corresponds to the feature service. Could this be having and issues?