Custom report will not open, MS Word error message

2858
7
Jump to solution
11-29-2018 01:15 PM
ChrisShuck
New Contributor III

I am attempting to download a custom report that has been generated, but I get the following error message from MS Word - "Word experienced an error trying to open the file". The file will not open. I have no problem opening the template from my desktop or downloading the template from the Survey123 website. Only the generated reports will not open. The xls and the Word template are both attached. 

Thanks,

Chris

0 Kudos
1 Solution

Accepted Solutions
ZhifangWang
Esri Regular Contributor

Hi Chris, 

Thanks for the error message screenshot, although it seems different with mine. After some investigation, we found that the problem may be caused by the start tag of your root repeat: ${Feature_r}. In your template, this tag is located in a table while then end tag of the repeat ${/Feature_r} is out of the same table. Generally, it requires to put the start and end tag of a repeat either inside the same table or outside a table at the same time. 

After moving the ${Feature_r} out of the table, the template should work fine. Would you mind having a try on the attached updated template?

View solution in original post

7 Replies
ChrisShuck
New Contributor III

Update:  I just updated another survey in the same way I did this one recently and received the same error. I believe that this may be related to the nested repeats present in both surveys. Before adding nested repeats, report generation for both surveys worked fine. They both have repeats that are nested within groups that are nested within a repeat along with other groups. Any guidance on how to resolve this issue would be appreciated. Thanks.

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi Chris Shuck‌, 

Thanks for the feedback and the attached files. 

By publishing a survey using your XLSForm and generating a report using your report template file, I can see the following error "Xml parsing error" in details when trying open the generated report. Can you please confirm if it's the error you've encountered? If not, what version of Microsoft Word do you use? Would you mind attaching a screenshot of the Microsoft Word error with details expanded?

0 Kudos
ChrisShuck
New Contributor III

Hi Zhifang,

A screen shot of the error message has been added to the main post above. The message doesn't give any details on the nature of the error. I am running Windows 10 and using Word Version 1811. 

Chris

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi Chris, 

Thanks for the error message screenshot, although it seems different with mine. After some investigation, we found that the problem may be caused by the start tag of your root repeat: ${Feature_r}. In your template, this tag is located in a table while then end tag of the repeat ${/Feature_r} is out of the same table. Generally, it requires to put the start and end tag of a repeat either inside the same table or outside a table at the same time. 

After moving the ${Feature_r} out of the table, the template should work fine. Would you mind having a try on the attached updated template?

ChrisShuck
New Contributor III

Hi Zhifang,

That did trick! Thank you so much for your help. 

Chris

0 Kudos
ZhifangWang
Esri Regular Contributor

Hi Chris,

Thanks again for your feedback. We will enhance our documentation accordingly in the next release.

0 Kudos
Peters_Amy
Occasional Contributor

Zhifang,

I am getting the same error that Chris was back in 2018.  The survey is unique since the project is actually a Field Maps project where the data and photos are being taken in Field Maps (I simply created a survey from the feature service for the sole purpose of being able to get a feature report).  I am aware that I can't control the size of the photos coming in from Field Maps with the custom report template.  Some of the reports (Word docs) will generate, but ones that are larger in size are getting this Word error (same as above) where they are being created but you can't open them in Word.  I am attaching all my docs. The third doc is a report that is broken. 

Thank you kindly.

Amy 

 

0 Kudos