If/EndIf in table in report

Hello,

I am producing a report with a table and I need to exclude certain fields based on criteria. These fields can be grouped. so e.g if field 1 has a certain value, then field 2, 3, 4 should not be shown. This works outside of a table as follows:

<<If: [Field 1]=”No”>>
<<[Field 2]>>:<<Field 3>>:<<[Field 4]>>
<< EndIf>>
<<If: [Field 5]=”No”>>
<<[Field 6]>>:<<[Field 7]>>:<<[Field 8]>>
<< EndIf>>

However once I try putting it into a table and spanning multiple cells in a row it doesn’t work. If I put the << EndIf>> in the same cell as the << End>> I get the error “Found 1 unmatched ‘Start’”. If I put the << EndIf> in a different cell, it doesn’t give an error, but it doesn’t display correctly.

I can get it to work by putting separate if/endif in each cell but makes the template hard to read and seems unnecessary, plus I have 20 groupings like this.

Are If/EndIf’s allowed span multiple cells in a row in a table?

Note I had to put spaces in all the endif and end’s above so they would be displayed correctly.
Thanks,
Steve

Solved Solved
0 9 549
1 ACCEPTED SOLUTION

As I thought, with your construct it’s not possible to have the data in the same table. Though you can have it almost. When you write the Start: expression before the table and End after the table, you can have this kind of result…

As you can see that the vertical border between 2nd and 3rd column is not exactly in the same position. Also it will produce two lines between tables. You should also keep in mind that if you use If: & EndIf it will hide values but it keeps the blank row in your table.

View solution in original post

9 REPLIES 9
Top Labels in this Space