Question
Building Table in DOCX with N number of ROW'S
I need to create a dynamic DOCX document that includes a table with 11 columns, where each column should automatically adjusts its width.
I have attached a code snippet that generates a DOCX document with a table showing only 8 columns. The remaining 3 columns exceed the page width, so they aren't visible.
Please help me to fix it.
SAP Number
Part Number
Description
Manufacturer
Group
Spare
Qty
Delivery Date
Price
Total
Remarks
",
a!forEach(
items: local!selectedEquipments,
expression: concat(
"",
"" & fv!item.sapnumber & " ",
"" & fv!item.partnumber & " ",
"" & fv!item.description & " ",
"" & if(
a!isNotNullOrEmpty(fv!item.manufacturer),
fv!item.manufacturer,
"--"
) & " ",
"" & fv!item.group & " ",
"" & if(fv!item.spare, "Yes", "No") & " ",
"" & fv!item.qty & " ",
"" & text(
todate(fv!item.deliverydate),
"yyyy/mm/dd"
) & " ",
"" & a!currency(isoCode: "USD", value: fv!item.cadprice) & " ",
"" & a!currency(isoCode: "USD", value: fv!item.pricetotal) & " ",
"" & if(
a!isNotNullOrEmpty(fv!item.remarks),
fv!item.remarks,
"--"
) & " ",
" "
)
),
"
",
)
)
)
),
"