If statements in a calc, .ods report


(Luis) #1

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


(Cédric Krier) #2

Only one if statement per row.


(Nicolas Évrard) #3

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.


(mono) #4

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 ‘’

(Luis) #5

Great. Thanks to all.


(system) closed #6

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