PDF Report reffering to sub sub table

I have a PDF report that i am generating as shown below, there is the main table slice “individual reports” which then has a sub table “materials used” and within that sub table is another sub table of the photos of the materials used. I can get it to bring up materials used but cannot get it to show the photos refferenced in the “materials used table”

Individual Report slice refferences Materials Used table which then refferences photos of materials used.

Thanks in advance for any help

0 17 341
17 REPLIES 17

The datasource name in the FILTER() function must be in quotes. Try this:

<<Start:FILTER("Individual Reports", true)>>

If understanding of your table structure is correct, in addition to @WillowMobileSystems useful input on syntax, please try with another <<START: …>> added before Photos table supplemented by << END >>

Also presume you are ahaving an << End >> statement corresponding to the first << START: … >> statement as highlighted in blue rectangles below.

Edit: There is a minor typo in the <<START…>> statement in the picture. A closing parenthesis was missing.
Please use
<<START:[Materials used]>>

This works great thank you, however is there a way of showing the photos against each individual materials used. At the moment the list of materials used is a list and then a seperate list for the photos. What i am trying to achieve is:

Material used - relevant photos
Next material used - relevant photos
etc

Also is there a way to force a new page at the end of each page?

Many thanks Bradley

if you are willing to slightly change the format of the report , please try the below template format. Here the Sub table ( child) fields are vertically arranged instead of horizontal table format. However it will give you the desired result.

I think , the horizontal format will become unwieldly in general , if you try to use it. So the below format you could try.

Edit: Minor edits in description.

Por qué las plantillas horizontales tiene problemas?

AppSheet doesn’t support that display style in templates. You’ll have great difficulty building the template to get what you want.

For this, I believe there is no easy way.

However @Jonathon has following great tip if you wish to try.

You can insert Page Breaks into the template and they will generate a new page. But, when you have dynamically generated content, the Page Break may happen when you really don’t want it to. For example maybe the content spills only a single line onto a new page. If the next thing is the Page Break then you will end up with a mostly blank page. I think this is expected for auto-generated documents but not necessarily known when you try it out at first.

Yes, you are correct @WillowMobileSystems . If the fields of the report were belonging to a single table and/or the fields lengths are predicable ( Name, price, etc) and are not address, text or long text fields that could spill into multiple lines, one can arrange the fields to possibly align in a single page.

In this case, @bradley_davis1 has not one but two children tables, so the single record length including children is likely to be very dynamic. So refrained from suggesting a “normal” adjustment of fields in one page.

Understood. Dynamically forcing a new page is difficult.

I did have a use case where there were “static” Terms and Conditions pages that needed to be included with every Invoice. Being able to simply insert a Page Break so that static pages ALWAYS started on a new page was an easy way of including them into a single document.

Ok Cracked it and looks perfect for what I want, thank both, really appreciate your feedback and guidance. attached as pdf

FTBS_Essex_From Period_28_11_2021_to_30_11_2021_Property Reports.pdf (480.8 KB)

Just a thought some of the materials used dont have photos but it still shows the table, is there anyway of making the table disappear unless there is photos to show?

Yes. You can use an <<IF>> template expression to perform that section of the template only if there are Photos. Something like:

...
<<If: (COUNT[Photos] > 0 )>>
Photos
...
<<EndIf>>
...

The "..." represent other template details

Ok new problem today duplicated what I did on my other report but keep getting an error message?

“Error 1 : ‘Create Property File’ task ‘Create Property Survey File’ Attachment template. Found 1 unmatched ‘Start’. They are:

<<start: ORDERBY([surveyed items],[location],FALSE)>>

Check the START in the Photos table and make sure there are no line breaks instead of line wrapping.

Otherwise, I’m not seeing where the problem is either. In these cases, I would start removing pieces and test until the error goes away and then look closely at what was removed to see what could be wrong.

Some slight tweeks and got there in the end, works perfectly now

@bradley_davis1 Thank you for sharing the template. Nice to know you have got it working per your requirement.

Top Labels in this Space