KoolReport's Forum

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

Sort problem #1414

Closed Michele Bassanini opened this topic on on Apr 29, 2020 - 3 comments

Michele Bassanini commented on Apr 29, 2020

Hi, I'm trying to sort the data retrieved by query with

->pipe(new Sort([
                "DATA_ORA_PRESENTAZIONE"=>"asc",
            ]))

after the query method, but it doesn't work.

My report code is published in topic #1411

I have tried to sort the query, to sort with the process or both, but the dates are shown in inverse order.

KoolReport commented on Apr 29, 2020

I think it is because of the format of your date time. Please try to reformat to the standard format Y-m-d H:i:s and then you can sort it. The Y-m-d is standard format for date and can be used to sort. Normally we deal with datetime, we try to keep the primitive format like Y-m-d until it reach the end in Widget, and we will convert to other format like "F j, Y".

Michele Bassanini commented on Apr 29, 2020

Thank you, it works now!

I have first of all converted date to Y-m-d for each of the tree datasource. Than I applied other processes, than save to variables, than convert date to "j F". At the end I applied the join (on the date field that is still Y-m-d) and than converted to "j F" in the last datasouce.

KoolReport commented on Apr 30, 2020

That's great :)

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
solved

None