KoolReport's Forum

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

LeftJoin - In datastore #2253

Closed KarineG opened this topic on on Aug 10, 2021 - 2 comments

KarineG commented on Aug 10, 2021

Hi,

How to do a LeftJoin without lose any data ?

Datastore 1 contains all contacts Id FirstName Lastname

Datasore 2 contains all sells by contacts IdContact IdOrder Amount Date

When i do left join (Id - IdContact) :

if contact hasn't order all columns of  first Datastore is replace by 0  for this contact.

I want : id Firstname Lastname idOrder Amount Date

I have 0 0 0 0 0 0

How to do ?

Thanks

Sebastian Morales commented on Aug 11, 2021

Pls open the file koolreport/core/src/core/DataStore.php and replace the following lines:

                        array_merge(
                            $this->rows[$i],
                            $secondNullRow
                        )

with these ones:

                        array_merge(
                            $secondNullRow,
                            $this->rows[$i]
                        )

Let us know if it works for you. Tks,

KarineG commented on Aug 11, 2021

Perfect !

Have a good day !

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

None