KoolReport's Forum

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

How do you pull an already created report into dashboard #2139

Open Damien Monk opened this topic on on Jun 9 - 4 comments

Damien Monk commented on Jun 9

Is it possible to just call a report that is already created into the dashboard?

I see a lot of examples how to use the dashboard to create reports but do you have an example of calling another folders index.php like you would an iframe to use the layout of the dashboard?

I would like to just use the dashboard menu to present already created reports for now and later use it to create reports.

Damien Monk commented on Jun 9

I didnt see this until now and its the same question im asking

https://www.koolreport.com/forum/topics/1880

Damien Monk commented on Jun 9

the original topic is exactly what I am needing to do also. There is no examples to try in that topic and its closed. The login info will be helpful but even a not so perfect example of how to wrap a report already created would be helpful. I already wrap my reports with a different UI iframe and it works perfectly in how it expands to the size of the iframe.

any examples even if not perfect would be helpful and also add me to the feature request also if it is still under consideration.

Damien Monk commented on Jun 11

No suggestions at all???

Damien Monk commented 7 days ago

Wish I could have had a bit of support on this but it made me start to understand dashboard a bit more.

Here is how you can bring an old report into the current dashboard

when you are creating your report class like in the example in dashboard documentation

<?php
use\koolreport\dashboard\Dashboard;

class PaymentsTable extends Dashboard
{
        protected function widgets()
        {
            return [
                    PaymentTable::create()
            ];
        }
}

CHANGE TO THIS


<?php
use\koolreport\dashboard\Dashboard;
use\koolreport\dashboard\containers\Panel;

class PaymentsTable extends Dashboard
{
        protected function widgets()
        {
        $url = '<iframe id="imdb" src="'.'http://youroldreporturl" style="width: 100%; height: 100%;"></iframe>';
            return [
                    Panel::create()->header($url)
            ];
        }
}

The panel that is produced is a bootstrap card. options are header(), footer() and cssStyling and you have to set the height in your css for the panel but it works.

A feature suggestion would be to allow body call like header and footer in Panel options and then you would have full control over the card created and put old reports, that are bootstrap styled well, in your dashboard all day long.

It works quite well with this hack at least and if anyone has a better suggestion, please add it as I have spent a lot of time looking and i didnt see one

ok well im having trouble with more than one report called but still trying to figure it out

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

Dashboard