Select to view content in your preferred language

Creating a report with repeats

2744
9
02-28-2023 08:46 AM
LydiaCarey
Occasional Contributor

Good afternoon everyone,

I am very curious if this is possible. I trying to create a report which has a lot of information on it and trying to keep the pages to a minimum. In my survey I have a repeat and I am wondering in my template i can create a "sideways" table for it. Its currently not working out for me and just wondering if anyone has any suggestions on how i can display all this repeat data in a minimalistic way

 Screenshot_20230228_112558.pngScreenshot_20230228_112621.png

Screenshot_20230228_112650.png

Tags (2)
0 Kudos
9 Replies
Katie_Clark
MVP Alum

Is the first screenshot you shared what you want the output to look like? I'm not quite sure what you mean by a "sideways" table. 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
Juneau_GIS
Emerging Contributor

When I first looked at reports I was trying to do the same.  My interpretation of sideways table:

I would love to be able to recreate this style with 1 report per feature, Sewer Manhole in this case.

Juneau_GIS_0-1677603613784.png

 

Katie_Clark
MVP Alum

In this case, since there is a set number of entries (maximum of 5 pipes in, two pipes out) I think your best bet will be to have specific questions for each cell. Each column in the table (pipe) could be a different group to help keep things a little better organized in the UI. But that way, you can reference specific field names to pull into the feature report. 

I know that's not the ideal answer, but as far as I know, you can't format repeats to populate vertically like that. I'd love to know if that's incorrect, though!

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
LydiaCarey
Occasional Contributor

Sad that's exactly what I am looking for, my repeats to populate vertically. Ill have to find another way to show the repeat data that doesn't take up multiple pages.

JenniferWeaver1
New Contributor

Curious if you've found a solution yet. I'm trying to do something similar.

0 Kudos
DavidCook2
Occasional Contributor
0 Kudos
AddieZannes1
Emerging Contributor

I think I worked out a solution to this problem.  The first step is to add a hidden integer field to your repeat which calculates a sequential number for each record in your repeat.  

once(count(${gfs_rpt_time})+1)

This is the formula for the calculation but replace ${gfs_rpt_time} with any field in your repeat.  Now you will have a value of 1, 2, 3 etc for each record in your repeat.

Then, in your report template, add the following where statement to the first part of your repeat section.  The structural_repeat_no field should be whatever you called your new integer field.

${#structural_repeat | where:"structural_repeat_no='1'"}

The only other issue is that if you are inserting the repeat values into a single table in Word, the repeats will populate in rows instead of in columns.  To overcome this, add each repeat section into a separate vertical table with one column.  Add the next table to the right with one column and start the repeat with a where clause that specifies "structural_repeat_no='2'.

Natalia
Emerging Contributor

Hi Addie,

This is exactly what I was looking for, thanks!

However, I need to tweak it a bit further and I was wondering if you would know how.

I created a hidden field within my repeats called 'hidden_field_repeat' which performs the once(count(${test_repeat})+1).

Then later in my survey, after the repeats are completed, I ask the user to number the repeat that is successful (to be included in the report). This field is an integer called 'repeat_integer'. 

Within the report, I can make your expression ${#test_repeat| where:" hidden_field_repeat='1'"}) ${floc_type}{\} work. However, I need it to be 'repeat_integer instead of '1'. This doesn't work 🤔

Do I need to include any further expressions such as GetValue?

I appreciate any advice!

Thanks,

 

Nat

0 Kudos
Natalia
Emerging Contributor

I managed to make it work like this:

  • I created a hidden integer field within my repeat called hidden_field_repeat, with the calculation once(count(${test_repeat}))
  • Later in my survey, outside of the repeat, I created an integer field where I ask the user to number the most successful repeat. This field is called repeat_integer.
  • In my report, I want my floc_type to be the successful type from the repeats. I bring it out like:

    ${#test_repeat| where:"hidden_field_repeat='"+repeat_integer+"'"}) ${floc_type}

    ${/} 

I hope this helps 🙂

 

Nat

0 Kudos