<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>I would use an Atlas - better then report, since reports haven't
      been further developed - and then use 3 pages. You can add pages
      clicking in the menu: Layout -> add pages. Then you go to page
      properties for the second page. there is a checkbox "exclude page
      from export" where you can use data defined override to check if
      the first photo on this page - photo number 3 for example does
      exists. You can use the function:</p>
    <pre wrap="" class="moz-quote-pre">not file_exists(@project_folder  || '/photos/' || "object_id" || '/basename_' || "picture_id" || '.jpg'). 

</pre>
    <p>If the photo does not exists, the page will not be exported, do
      the same with the third page...</p>
    <img moz-do-not-send="false"
      src="cid:part1.gzEnSbpR.sfkz9xMP@wheregroup.com" alt=""
      width="1652" height="952">
    <p></p>
    <div class="moz-cite-prefix">Best regards</div>
    <div class="moz-cite-prefix">Stefan<br>
    </div>
    <div class="moz-cite-prefix">
      <pre class="moz-signature" cols="72">-- 
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant

---------------------------------------------
Schon gewusst?

In unserem Blog geben wir Tipps & Tricks zu Open-Source-GIS-Software 
und berichten aus unseren Projekten

<a class="moz-txt-link-freetext" href="https://wheregroup.com/blog/">https://wheregroup.com/blog/</a>
---------------------------------------------
WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Tel.: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

<a class="moz-txt-link-abbreviated" href="mailto:stefan.giese@wheregroup.com">stefan.giese@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885</pre>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">Am 24.01.2025 um 08:50 schrieb Voisard
      François via QGIS-User:<br>
    </div>
    <blockquote type="cite"
      cite="mid:a121ea7441004a03935fa1f5eb9d05fe@ne.ch">
      <pre wrap="" class="moz-quote-pre">Hi all,

I am looking for ideas/examples how to create a report (or an atlas) where for each object (e.g. public gardens) we have a variable number of photos (let's say 1 up to 9) that we would like to display.

The photos are named and stored so that we can fetch them by an expression like this:
@project_folder  || '/photos/' || "object_id" || '/basename_' || "picture_id" || '.jpg'

The issue I run into is that I would need a loop to get all the photos in the object_id folder and that depending on the number I'd probably have, one up to three pages with photos depending on the layout.

A very simple example of a layout would be like this : <a class="moz-txt-link-freetext" href="https://sitn.ne.ch/web/diffusion/tmp/qgis_atlas_example.png">https://sitn.ne.ch/web/diffusion/tmp/qgis_atlas_example.png</a>

Any suggestions how to approach it? Report or atlas?
With an HTML element block maybe?
Any existing examples?

Many thanks for your help and best regards,

François Voisard
Ingénieur en géomatique


_______________________________________________
QGIS-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>

</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">
</pre>
  </body>
</html>