KoolReport's Forum

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

Contributions for better table #478

Open Future Lab opened this topic on on Sep 22, 2018 - 4 comments

Future Lab commented on Sep 22, 2018

(Sorry about my english). My company requirements are more sophisticated for the usage of Table or DataTable. None of them do things like iReport , for that reason i implement over your code some changes that not touch anything of the main code but add support for groups and totals on groups , see the images.

Note: the excessive colors , strange format , etc are for show posible definitions of the totals.

The memory usage is better now and the grouping use less array elements (a lot less) and support format,css,etc for the totals.

The execution time showed is the time to create groups and totals for the near 19,000 records of the sample data.

The question is , i send the code as contribution or create a new widget? Is important for me that the base code can do this sort of things.

KoolReport commented on Sep 23, 2018

That's awesome. I think you should send as a new Widget or better a package containing that Widget. You can create a new package with your table like this:

  1. Create folder 'futurelab" under packages
  2. Create "Table.php" containing Table class with namespace "koolreport/futurelab". Your Table should derive from our Table and overwrite functions and anything necessary.
  3. Remember, you may need to copy the "table" containing table.js and table.css to your futurelab folder.

So at the end , you have your own package contain your koolreport\futurelab\Table which you can use in your project without worrying about changes.

You can host the package zip file somewhere and paste link here for other to download.

In near future, we will create a repo on github so everyone can contribute new packages code.

Let me know what do you think.

Future Lab commented on Sep 23, 2018

ok looks good , i will try now and test , comments later Thanks

Future Lab commented on Sep 23, 2018

Hmm but your onRender code do 3 things clearly different that can be broken in 3 functions , i will need for now to copy 80% to the onRender() and insert my code , not the most efficient way of inheritance but for now doesnt exist another way, ok i will try .

Future Lab commented on Oct 11, 2018

Hi , i create a github repository for the enhanced table , your recommendation to publish?

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
suggestion

None