KoolReport's Forum

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

Problems with sorting and pdf printing #3102

Open Luigi Bisbiglia opened this topic on on Jul 24, 2023 - 3 comments

Luigi Bisbiglia commented on Jul 24, 2023

Hello, I have the same problem of the issue n. #629 about formatting and sorting of the numbers. I have resolved this using the formatValue function but now the pdf/csv export is printing also the numpad value. How i can resolve this?

David Winterburn commented on Jul 27, 2023

Would you pls post a specific example including screenshots if possible for us to understand the issue more?

If you want to sort DataTables' column by numeric values, one answer is here:

DataGrid / DataTables not sorting numerics

Luigi Bisbiglia commented on Jul 27, 2023

With default params works number_format($value,2);

But changing thousands and decimal separator doesn't work number_format($value,2, ",", ".");

David Winterburn commented on Aug 3, 2023

You are correct. Sorting with the "num-fmt" type only works with "." as decimal point and "," as thousand separator and not the reversed case. For those case, we have another more universal solution of using "data-order" attribute to sort a formatted data column by another raw data one.

Here are previous topics with solutions:

Datatables - sorting by date

Ordering column inside DataTables with 'data-order' ...

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
bug
help needed

DataGrid