Control overall Invoice height in spite of varying lines (Productivity Suite)

Discussion in 'Free Source Codes' started by Tanmoy Sinha, Apr 27, 2020.

    
  1. Tanmoy Sinha

    Tanmoy Sinha New Member


    Hello,
    I wanted to share a quick tip I found out when you are using Productivity Suite to customize the Invoice format.

    If you place the repeating tokens directly in the table cell, it causes the overall height of the printed invoice to vary depending on how many lines are printed.

    If you want to avoid this you can follow these steps:
    1. Merge all field cells (e.g. 7 cells for the 7 fields in the example below) and increase the height sufficient enough to accommodate multiple lines.
    2. Create a new table inside this cell and place the Tokens inside this new table.

    By doing this, the rows of the inside table will be added for every item and it will not affect the overall height of the invoice.

    Hope you find this useful. Please share your comments and other suggestions.

    upload_2020-4-27_12-14-25.png
     


  2. jgkumar1976

    jgkumar1976 Member


    GIVE THE EXAMPLE THROUGH CODE PLEASE
     


  3. Tanmoy Sinha

    Tanmoy Sinha New Member


    @jgkumar1976,
    This example is not about TDL code, rather its about how to set up the template file.
     


  4. Lynch

    Lynch Member


    yes, I face the problem with address. I've given $address to print the address from a collection but in the right adjacent cell's xml tag also printed as many times as the $address got filled up... this table within a cell actually helped. Thanks a lot.

    But I was trying to do a thing. I tried a function to concatenate the address collection with $$newline in between. But the $$newline is not working when I need to give carriage return in the text of a particular field so that it will fit in the Productivity suite.

    In short, the $$newline is not passing across the XML Map.

    I'm literally breaking my head to overcome this.
     


Share This Page