KoolReport's Forum

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

Inputs not working on Dashboard #2075

Open Christian Voß opened this topic on on May 12, 2021 - 2 comments

Christian Voß commented on May 12, 2021

I'm sorry to keep you busy, but I keep on finding things that don't work, although I'm still hoping that I'm the problem.

I just added a select input to the dashboard:

 Select::create([
                        "name"=>"select",
                        "dataStore"=>(new TrendChart)->dataStore("organisation_groups"),
                        "dataBind"=>["text"=>"name","value"=>"id"],
                    ])

And i get the following error message:

Message: Illegal offset type
Line: 121
File: D:\inetpub\wwwroot\webVM\vendor\koolreport\dashboard\Dashboard.php
 Collapse
#0: D:\inetpub\wwwroot\webVM\vendor\koolreport\dashboard\Dashboard.php Line 121 : koolreport\dashboard\{closure}([2,"Illegal offset type","D:\\inetpub\\wwwroot\\webVM\\vendor\\koolreport\\dashboard\\Dashboard.php",121,{"items":[{}],"widgets":{"KWidget":{}},"item":{},"subWidgets":[{},{},{},{}],"wg":{}}])

I checked the line and noticed that the widget->name() function for inputs returns an array while it returns a string for all other Widgets.

Please let me know if I can do anything to fix this issue.

Thanks

Christian

KoolReport commented on May 12, 2021

Please use the koolreport\dashboard\inputs\Select. We have inputs example here. And here is way to create your own Select widget.

KoolReport commented on May 13, 2021

A little information about Dashboard Framework. Dashboard Framework is built on top of KoolReport Pro, use ready made functions and features of KoolReport Pro to construct a framework targeting to build online dashboard. The widget of KoolReport Pro does not work directly inside Dashboard and require an wrapper. For most of KoolReport Pro widget, you can use our common KWidget wrapper to make them work inside Dashboard's environment. Some of important widgets like inputs or google charts, we have provide solid wrapper like the koolreport\dashboard\inputs\Select which has full integration with Dashboard environment.

In the future we continue to make wrapper for all widgets from KoolReport Pro to be used natively in Dashboard.

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

Dashboard