Select to view content in your preferred language

When making a report from 2 records a repeat section in a conditional report element is causing an error

2492
9
Jump to solution
09-13-2023 03:27 PM
SLUBrookeJohnson
Emerging Contributor

When making a report from 2 records a repeat section in a conditional report element is causing an error "The task failed because all reports failed to run printIndividual." I'm quite sure this is what's causing the error since I tried generating a report where the repeat section is outside conditional report element and it would work.

On the attached word document below, what I'm trying to achieve is basically a template for a before and after picture with details of a location, and I'm hoping for the repeat to show 2 images in one page from 2 different records. Which works for the first 4 pages but when it gets to the 5th page where it's in a conditional element, it gets an error.

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
BarbaraWebster1
Esri Regular Contributor

@SLUBrookeJohnson Yes, it isn't possible to include images in a repeat in a summary section. I don't believe there are any workarounds to this, although there is an ArcGIS Idea open to add this functionality.

If you're open to editing your survey structure, one approach would be to store the monitoring results as a repeat in your survey and field crews would access them through the inbox. Then you could display the before and after photos in the same report since they would be stored within the same record. 

View solution in original post

9 Replies
BarbaraWebster1
Esri Regular Contributor

Hi @SLUBrookeJohnson,

The table structure for the table on page 5 is more complex than all the others. It looks like there are merged or split cells, which can cause issues for repeats in tables. All your other tables have a more simple table structure with individual questions separated by line breaks within table cells. Have you tried that approach for the table on page 5? 

If that's not the issue, if you're able to provide the XLSForm we can look into it in more detail.

Thanks,
-Barbara

0 Kudos
SLUBrookeJohnson
Emerging Contributor

Hi Barbara, thanks for responding to my issue.

Yes the table structure for page 5 is indeed more complex than the following pages, but that is what I'm trying to do from page 5 to the last page. And I've said it my post as well but I believe what causes the error is due to the repeat being in a conditional element code. I have also tried doing only the repeat by itself and the conditional element code by itself, and both work fine. But for some reason nesting the repeat in the conditional element code causes the "The task failed because all reports failed to run printIndividual."

I'll attach the XLSForm below for reference. And a 1 record template I also made as a reference for the 2 record template. I have also changed one of the fields used in the template, so I will be attaching an update of the 2 record template as well.

0 Kudos
BarbaraWebster1
Esri Regular Contributor

Thanks @SLUBrookeJohnson, I took a look at your XLSForm and reread your original post. In order to display data from two separate records on one page, your report template would need to have a summary section with the $<$summary> $</> start and end tags, otherwise the report service will assume it is an individual report and only evaluate one record at a time. 

I think the conditional element is causing issues because the ${if t1_q_num >= 0} expression would only work in an individual report and the ${#mainLayer}${/} syntax is only intended for a summary section.

SLUBrookeJohnson
Emerging Contributor

Thanks for the response, I tried using the summary section and the next problem that occurs is that I am unable to attach photos in a loop inside a summary. And after looking for workarounds to this problem, I read that an update last year made users not able to do this anymore.

Is there any workaround you happen to know? or better yet is there way to call a field from a specific record in those selections?

That is unfortunate that the ${#mainLayer}${/} syntax is only intended for a summary section

0 Kudos
BarbaraWebster1
Esri Regular Contributor

@SLUBrookeJohnson Yes, it isn't possible to include images in a repeat in a summary section. I don't believe there are any workarounds to this, although there is an ArcGIS Idea open to add this functionality.

If you're open to editing your survey structure, one approach would be to store the monitoring results as a repeat in your survey and field crews would access them through the inbox. Then you could display the before and after photos in the same report since they would be stored within the same record. 

SLUBrookeJohnson
Emerging Contributor

That's actually an interesting solution, and just to clarify if I understood it right. In one record I would be able to have a before and after by using a repeat that wraps around the whole survey?

0 Kudos
BarbaraWebster1
Esri Regular Contributor

Yes, except the monitoring area name and a geoshape would be outside the repeat since you would have multiple inspections associated with the single polygon. This video includes a demo that uses that approach for field inspections. The demo starts at 5:13 and gets into how the inspection repeat is used at around 7:30. The survey Ismael is using is also available in Connect in the Esri template section.

SLUBrookeJohnson
Emerging Contributor

Your idea worked perfectly! I was able to do what I wanted with a few adjustments to the survey and the report template. Thank you so much!

0 Kudos
BarbaraWebster1
Esri Regular Contributor

Glad to hear it worked for you!

0 Kudos