Search code examples
peoplesoftbi-publisher

BI Publisher RTF template conditional code hiding extra elements


I have the below BI Publisher Microsoft Word RTF template. I needed to copy some code from another template (the works appropriately) that conditionally displays one of two bank logos. I also copied code that conditionally either displays a signature or leaves a blank line.

enter image description here

I am testing this for when the Bank is equal to 'FCNB' so it should be displaying the 'First Citizens National Bank' logo, and the signature line should be blank. Here is how the template renders with data:

enter image description here

You can see it moved up the Descrip and Addre1 lines up into the Remittance section. And then for the signature, it left the signatue blank (which is correct in this case) however it also cleared out the "Pay to the order of" and Name/Address details to the left of it, also isnt displaying the line for the signature. Somehow the conditional code is wrapping that other text inside the conditional. Not sure what is happening with the logo but somehow it is moving the text elements to the left (Descrip and Addres1) up above it. I've tried playing with inserting tables and seperating the grid lines below and nothing is working. What can I do to fix this? Let me know if you need any other information. Thanks in advance!


Solution

  • Usually the "if" is placed at the beginning of the first column of a row, and then the "end if" at the end of the last column. This is used to conditionally show/hide the entire row.

    I see from your image of your template that the if/end-if pairs are spanning different cells, and are not at the beginning or end of a row, which will cause all sorts of problems. When if/end-if statements span multiple cells, which are not at the beginning or end of a row, funny things happen. This is what you are experiencing. For sure this is why your pay to the order of section is not showing.

    When rendered, scripting is removed, so feel free to put the if/end-if in the same cell with the logo. It will look funny on the template, but should render fine.

    The line in the signature area is missing because it's part of the image which you have conditionally shown.

    Also, nested tables may help you.