If statements in a calc, .ods report

I need to put a various if statements in my report but I receive as error: “AssertionError: No common ancestor found for opening and closing tag”
What is the correct way to use several continuous if in the template

This is the way that i tried:

2019-04-01_09-11

1 Like

Only one if statement per row.

Did you try putting the if, the content of the column and the closing /if in the same cell?

Because the cell will be there anyway, empty or not it’s the if that decides it.

I use the python syntax on the cell without relatorio if statement, that can help you:

  • URL: relatorio://line.product.country.code if line.product.country else ‘’
  • Text: line.product.country.code if line.product.country else ‘’

Great. Thanks to all.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.