Hide form export

HI,

How can you hide a part of the code when exporting to PDF?

| Fiche 281.50? | {%input detail.custom.fact as:select options:janee_types option_values:‘ja|nee’ default:‘nee’ %}
| {% if detail.custom.fact == ‘ja’ %} (Fiche 281.50) {% else %} (Geen fiche 281.50) {% endif %}

I would like to hide the following:

| Fiche 281.50? | {%input detail.custom.fact as:select options:janee_types option_values:‘ja|nee’ default:‘nee’ %}

Many thanks!

Hello @Thijs,

You can do this by using following tags :

{% nic %}and {% endnic %}

So everything between those tags, will not be shown in an export ( nic stands for Not Input Comment).

You can find more related info here as well.

1 Like

Thanks! Worked Fine.

What I was not able the find if you can get a backgroundcolor (marker) on text?

<font color="1c4264">{% t "42-rekening" %}</font>

For now, that’s not possible in Silverfin @Thijs . The code you post, is the one I would’ve sugggest to you to use.

Is there a reason why that might not be enough? Asking this because personally, in an export, marked background of words or text, is not that great looking. But then again, it does stand out more in comparison with just colored words.

In a template i’ve linked the 42 and 65 account. Would be nice if they had the same layout as the 17-account.

My code:

|-----|----:+
|{% ic %}*{% t "42-rekening" %}:* {% endic %}{% input custom[current_account.number].account_42 as:account_collection range:42 %}{% assign account_42 = period.accounts.include_zeros | range:custom[current_account.number].account_42 %}{% if account_42.first %}**{{ account_42.first.number }} {{account_42.first.name}}**{% endif %}|{{ -1*account_42.value | currency }}
|{% ic %}*{% t "65-rekening" %}:* {% endic %}{% input custom[current_account.number].account_65 as:account_collection range:65 %}{% assign account_65 = period.accounts.include_zeros | range:custom[current_account.number].account_65 %}{% if account_65.first %}**{{ account_65.first.number }} {{account_65.first.name}}**{% endif %}|{{ account_65.value | currency }}

Tried this but was not able to get it right:

|--------+{{export.highlight_alt_bg_color}}
|<font color="{{export.highlight_alt_text_color}}">{{ account_or_text.name }}</font>

@Thijs,

The {{export.highlight_alt_bg_color}} is something that doesn’t work for me as well in a text, account or reconciliation template.

We use this in our standard detail text of our style (as you have already discovered), but not sure how this is rendered. Probably @Tim knows exactly how this works in our background code of Silverfin.

We’ll get back to this ASAP

I’ve read something about this from Tim.

You need to add the colour code at the end of the table line.

Thanks, worked fine.

If anyone wants to use this:

Code:

|-----|----:+1c4264
|{% ic %}{% t “42-rekening” %}: {% endic %}{% input custom[current_account.number].account_42 as:account_collection range:42 %}{% assign account_42 = period.accounts.include_zeros | range:custom[current_account.number].account_42 %}{% if account_42.first %}{% ic %} {{ account_42.first.number }} {{account_42.first.name}}{% endic %}{% nic %} {{ account_42.first.number }} {{account_42.first.name}}{% endnic %}{% endif %}| {% ic %} {{ -1account_42.value | currency }} {% endic %}{% nic %} {{ -1account_42.value | currency }} {% endnic %}

|-----|----:+1c4264
|{% ic %}{% t “65-rekening” %}: {% endic %}{% input custom[current_account.number].account_65 as:account_collection range:65 %}{% assign account_65 = period.accounts.include_zeros | range:custom[current_account.number].account_65 %}{% if account_65.first %}{% ic %} {{ account_65.first.number }} {{account_65.first.name}}{% endic %}{% nic %} {{ account_65.first.number }} {{account_65.first.name}}{% endnic %}{% endif %}| {% ic %} {{ account_65.value | currency }} {% endic %}{% nic %} {{ account_65.value | currency }} {% endnic %}

Input mode:

Export mode:

@Wim @Thijs,

Thanks for sharing! As you know by now, this works only in export-mode.