View Only
  • 1.  Export a custom Word template, getting Table Headers right

    Posted 10-21-2022 01:24
    Edited by R Brouns 10-21-2022 01:30
    Hello all,

    I need some help with ensuring a certain format when exporting a Word document based on a Set of 'SRS' and using a custom template.
    The problem is that I need:
    • General introduction chapters (TXT in FLD), just showing folder name + description --> works
    • Requirement chapters (SRS in FLD), exported into tables --> works
    • Each table in Item type SRS should have a TableHeader --> does not work

    I cannot get the TableHeaders to repeat as desired. I understand what happens/why I get the wrong result, but need help with the correct Template markup.

    What I like to get exported (but cannot get):

    One header PER table

    I come close, but do not get it right entirely.
    I can get either one of the below, but not with a TableHeader per table:

    1. Not right: No tableheaders
    Exported from JAMA:

    Uses template:

    2. Not right: Too much tableheaders (per item)

    Exported from JAMA:

    Uses template:

    Some other things I'm already aware of/tried:

    • I tried use the Mergefield TableStart:CHILDREN:SRS because this doesn't allow me to use another Table inside it (notice the TableStart:RELATIONSHIPS) as JAMA does not support nesting tables as I understood?
    • We are on Jama Cloud (not self-hosted), so I'm trying to use regular exports and not Velocity Reports. That's because for those, I understand I would need to work together with engineers on your side which requires more investment.
    • I put the TableHeader (on its own) in TemplateStart:FLD as sort of workaround. But that's not right either, as I get the header then also in the introduction chapters

    Thanks for your help!

      R Brouns

    • 2.  RE: Export a custom Word template, getting Table Headers right

      Posted 10-27-2022 01:16
      Edited by Patrick Szabo 10-27-2022 22:53
      we had a similar issue and this is how it works for us:

      As this adds the table header in all the chapters, we have added a macro to the template which removes all the tables with only one row when the document is opened for the first time:
          For Each Tbl In ThisDocument.Tables
              If Tbl.Rows.Count = 1 Then
              End If
          Next Tbl​

      But as you have already pointed out, this does not work with the relationship field included.

      Maybe the solution for you would be to take your 2nd example and write a macro which removes every uneven row (except the first) upon opening the document.