KoolReport's Forum

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

Export & SubReport for Dashboard #1892

Open Andre Van Der Walt opened this topic on on Feb 2, 2021 - 5 comments

Andre Van Der Walt commented on Feb 2, 2021

Hi.

Is it possible to have the export options on the charttable to be available on the Table widgets for the Dashboard.

Also are subReports available too for the dashboard.

Thanks.

KoolReport commented on Feb 3, 2021

Hi Andre,

Exporting feature is not available yet in dashboard but they do have in our list of features.

About subReport, there is no need to use subReport inside Dashboard as feature of dashboard can cover ability of subReport. If you could let me know details of what you are trying to complete, I will guide you better.

Andre Van Der Walt commented on Feb 3, 2021

Hi,

Filters are interdependent but at the moment they are static they show even when there's no data for instance A select2 will show even when there aren't any options available so I'd rather not have it show entirely in this case and just show those with options available if that makes sense.

KoolReport commented on Feb 3, 2021

You can use enabled() function for example:

MySelect2::create("mySelect2")->enabled(function($request){
    $numRows = AutoMaker::table("employees")
        ->count() // Count number of row
        ->run() //Run query immediately
        ->getScalar(); //Receive DataStore but then getScalar()
    if($numRows<=0) {
        return false;
    }    
    return true;
})

In above example, we will query database and count number of row, we run query immediately and get number of row. If the number of row is 0 then return false, meaning that the MySelect2 will not be displayed or accessible. Otherwise in case there is data, it will show and retrievable.

Note: When you access the value of mySelect2, you need to check whether mySelect2 is existed because using enabled() like this, mySelect2 will not available when there is no data, that's why you may get null when trying to get $this->sibling("mySelect2").

Hope that helps.

Andre Van Der Walt commented on Feb 8, 2021

Is it possible to use the result from the Select2 class instead.

KoolReport commented on Feb 8, 2021

Yes, you can use. Make sure that to check null value before calling value() as it may not available if it is not enabled.

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