Print unique rows based on a column and disable a column from printing!
Print unique rows based on a column and disable a column from printing!
akrinis
Posts: 2Questions: 2Answers: 0
Hello,
Let's say that we have two columns "client ID" & "Product" with follow data
Client_1 Product_1
Client_1 Product_2
Client_1 Product_3
Client_2 Product_1
Client_2 Product_2
So, I would like to print only the 1st column and only the unique values! So, it would be
Client_1
Client_2
Thank you
This discussion has been closed.
Answers
Good question. Yes it is possible - although you'll need provide a function that would select the rows you want to export.
Specifically, use the
exportOptions
property of theprint
button type, which is passed to thebuttons.exportData()
method. That let's you use arow-selector
- which can be given as a function. As a function it has access to the data in the table, so you can decide to include a row or not based on whatever logic you want (in this case, if your function as seen the data already or not).There is probably a simpler way, but that's the one that springs to mind.
Allan