Have a little bit of an urgent question. You can see below that the table is exporting on a new page. Despite the space being there.
However, you can see from the code snippit below that there is no syntax that should be causing that. No group tags or newpage syntax anywhere.
I suspect it has something to do with the Detailed text. But I am not certain. Here is a code snippit of our Detailed text:
Code for detailed text:
{% comment %}
------------------------------ INFO DETAIL TEXT ----------------------------------
Detail texts are used to export details from account and reconciliation templates ONLY
(text templates will go automatically)
Basically, detail text is what gets executed when selecting a block “accounts”
We can loop over accounts, using the acc number as the unique key component
We can loop over reconciliations as well, using the virtual account number as key
Access to the needed details sits within the
“export.selected_accounts_and_reconciliation_texts”, which can be filtered on:
- account or not
- type (assets, liabilities, …)
- number (acc and virtual acc number)
Keep in mind that a virtual acc nbr can also be a string, just like an acc nbr can be
attribute “is_account”
To define when a detail is from an account or not
local var “new_page”
We create a variable new_page to dictate that the very first detail of a second block
accounts, is forced on a new page. If not, the second block would start right after the
first block.
So in the beginning this var is false; after that it’s set on true
changeorientation
This is used to decide “landscape” or “portrait”
- when “preferred_orientation” is used, we will look at the amount of columns defined
in a detail; more than 7 is automatically “landscape” - we can overrule above by using changeorientation “portrait”/“landscape”
{::group}
We need to be sure one detail stays together, which is why we use group-tags.
Keep in mind, {::group} opens a tag while {:/group} closes it.
These tags are also present in details, which is why there we first use a closing group
tag.
{% endcomment %}
{% assign details_wp = export.selected_accounts_and_reconciliation_texts.include_zeros_with_details | range:“1__9,a__z” %}
{% for detail in details_wp %}
{% if forloop.first %}
{% if new_page %}
{% newpage detail.preferred_orientation %}
{% endif %}
{% comment %}
{% assign new_page = true %}
{% endcomment %}
{% changeorientation detail.preferred_orientation %}
{% comment %}Title of a block when in first loop{% endcomment %}
{% endif %}
{% comment %}
RECONS ONLY
{% endcomment %}
{% comment %}
{% changeorientation detail.preferred_orientation %}
{% endcomment %}
{% comment %}details reconciliation{% endcomment %}
{{ detail.rendered_template }}
{% endfor %}