1

I created an atlas with two pages for each atlas feature, the first being for a map and the second page being for a table. I need to separate pages as the map is using all the paper space and the table is varying a lot.

As some maps are in portrait and some are in landscape (depending on atlas feature geometry), I specified the X and Y of each item (legend, maps, table, north arrow) according to the orientation of the atlas geometry.

Here is an example for one item:

For x: if(bounds_height( @atlas_geometry ) > bounds_width( @atlas_geometry ) ,'11','30')

For y:if(bounds_height( @atlas_geometry ) > bounds_width( @atlas_geometry ) ,'90','60')

Here is my problem: For every atlas feature, I would like this example item to be located on page 2. If I move it manually to page 2 it remains in page 1. If I deactivate the X and Y formula, I can manually move it to page 2.

My question: Is there a way to force item to be on page 2 while writing the formula for X and Y positions?

I have one idea but not very convenient, go beyond the first page border. For example for Y, in case of portrait, I can give a figure between 297 mm and 594 mm.

First page of the first atlas feature

Second page of the first atlas feature

  • Why do you need data-defined placement for the table? Put another way, why not just place it on the second page? – csk Feb 20 '18 at 19:34
  • I need data-defined placement because if my map is in portrait then I want my table to be also in portrait and if my map is landscape I want my table in landscape. One way to solve the issue is to use two composers: one for the maps and one for the tables and when exporting use ouptut naming such as A and B. My first thought when raising the topic is to explain there is a bug in QGIS: data-defined placement is related to page 1 and cannot be related to another page. Is it feasible to add a function to solve this issue? – Maxime Riou Feb 21 '18 at 17:52
  • 1
    As a workaround, you could have two tables, one set up for portrait layout and one for landscape. Use data-defined transparency to make the portrait table 100% transparent when the composer is in landscape mode, vice versa for the landscape table. – csk Feb 26 '18 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.