KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

How to hide an empty column from DataTables #2230

Open Dimitar opened this topic on on Jul 26, 2021 - 1 comments

Dimitar commented on Jul 26, 2021

I have DataTable that is generated from SQL database based on search criteria. I need a way to hide a column when the values in it are empty or zero. Footer shows sum of all values so it is also zero in that case - I don't know if I can check somehow footer value and hide the column when footer is zero or to check individual values in the column?

Sebastian Morales commented on Jul 27, 2021

Using sum == 0 is not reliable in your case because there could be rows with none empty/zero values but their sum is still zero. You would have to check every row of your data to decide if a column has all empty/zero values. Rgds,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

DataGrid