KoolReport's Forum

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

Group Function not working as expected #1586

Closed The O opened this topic on on Aug 20, 2020 - 1 comments

The O commented on Aug 20, 2020

Sending the following to a DataTable shows the Group function has no effect, all records are returned rather than how a direct MySQL groups stuff:

	   $this->src("config")->query(DB::table('history'))
		   ->pipe($this->dataStore("tbl"))
		   ->pipe(new Group(array(
				"by"=>"name",
			        "sum" =>"amount"
			)));
		   

It gives same result as when I remove the last pipe. How can this be fixed?

David Winterburn commented on Aug 20, 2020

Please put the Group process before piping to your datastore. Once a data pipe reaches a datastore it is the end, no more processes could be done.

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