docxTable merged cells



  • Hi,

    is it possible to have merged cells in docxTable (using handlebars engine and docx recipe)?


  • administrators

    hi! how are you defining the docxTable? are you trying to create the table from the scratch using the {{docxTable rows=rowsItems columns=columnsItems}}? if yes, then this is not supported at the moment, however for the classic usage of docxTable it should be already supported if you have some merged cell already on the row.



  • Thanks @bjrmatos, I am defining it in the standard method, I guess (see image):

    merged cells current template

    What I am trying to achieve is this...

    merged cells desired result
    (note that "date" and "quantity" columns can have a variable number of rows)

    ...but I don't understand how I should define the table and/or the data to do it. Is it even possible?



  • ps: just to be clear, the data set behind the above example would be

    [
      {
        "datalogger": "PLV_CEM01",
        "data": [
          {"date": "15/10/2019", "qty": 117.6},
          {"date": "14/11/2019", "qty": 192.8},
          {"date": "20/12/2019", "qty": 93.2},
          {"date": "02/03/2020", "qty": 69.4}
        ],
        "aggregated_qty": 625.2
      },
      {
        "datalogger": "PLV_PAR01",
        "data": [
          {"date": "15/10/2019", "qty": 122.4},
          {"date": "14/11/2019", "qty": 205.8}
        ],
        "aggregated_qty": 669.6
      },
      {
        "datalogger": "PLV_PAR02",
        "data": [
          {"date": "15/10/2019", "qty": 120.2},
          {"date": "14/11/2019", "qty": 172.2},
          {"date": "20/12/2019", "qty": 81.6}
        ],
        "aggregated_qty": 587.6
      }
    ]
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.