Duplicate Rows based on Column in PDF Generation

I would argue that if its a requirement to have two rows displayed then it IS necessary to have two rows representing that display in the data. It certainly would make your use cases easier. And there should not be any concern having the extra rows in the data. But we don’t know your use case nor why you want to do this.

So….

You can use IF statements in templates to control the flow. You can get more details at Use If expressions in templates

Basically, you would do something like this:

{{{ Insert table column headers here }}}
<<START….>>
{{{ insert data row here }}}
<<IF [Type] = "AA">>
{{{ insert duplicate data row here }}}
<<ENDIF>>
<<END>>

CAUTION: because this breaks the table into three separate tables, you need to be very diligent about formatting the column widths and the tables themselves precisely the same for each piece. Otherwise, you will end up with mis-aligned columns.

For a more elegant way of producing reports, you might want to learn HTML formatting techniques. In this post there is a reference to 3 Tip articles that give step by step details on how to go about producing such reports. There is a learning curve - one which I have yet to take.

I hope this helps!

3 Likes