KoolReport's Forum

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

How to Add Table Search and Extra filers input in Dashboard #2040

Open Sivaprasad opened this topic on on Apr 20, 2021 - 2 comments

Sivaprasad commented on Apr 20, 2021

I didn't find any example how to add table search and input fields to the Table in a Dashboard Packages

KoolReport commented on Apr 20, 2021

Basically it is combination of some examples. I guess you know how to use table already, pretty straight forward. Second, please look for example which we use inputs element to receive value and post back to server. We use the "change" event to update other widget. So basically you will have a textbox widget, use "change" event to update table widget. In table widget, you will access the value of textbox and use it as parameter to query data (inside dataSource() function).

Example of textbox change event

Example of table get value as its parameter

Hope that helps.

Sivaprasad commented on Apr 20, 2021

i have Created the table i Need to Pass input parameter do you have any example

class OrderTable extends Table {

protected function onInit()
{
    $this->pageSize(10);
}
protected function dataSource()
{
          // $range = $this->sibling("OrderQuantity")->value();
    $range ="Online Payment";
    return AutoMaker::table("orders")
            ->where("Payment_Type",$range)
            ->select("orders.Order_Number","Student_Name","Account_No","Books_Status");
          
}

}

In range In need to pass parameter dynamic

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
None yet

Dashboard