KoolReport's Forum

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

I am not connecting something here #482

Open Dustin Tuft opened this topic on on Sep 26, 2018 - 10 comments

Dustin Tuft commented on Sep 26, 2018

Hi I am trying to setup a demo of this tool as a proof of concept, but I am missing something.

I am using Codeigniter 3.1, I am not using composer in my setup. Where I am lost is, if I am not using composer where should I place the koolreports code and how do I tie it into CI? I was confused by the codeigniter package instructions I found here > https://github.com/koolphp/koolreport/issues/4, is there a step by step some where?

Thanks!

KoolReport commented on Sep 26, 2018

Hi,

If you dont you composer, it is fine. Please follow above instruction, these instructions are correct. You can place koolreport library anywhere, in above guide, we use the "libaries" folder but actually you can place in your chosen folder. The most important is the require autoad.php in the report class.

require_once "/path/to/koolreport/autoload.php";
class MyReport extends \koolreport\KoolReport
{

}

And in your controller of CI, you should require your report class on top of the file.

require_once "/path/to/MyReport.php"

it will allow you to get reference to MyReport class so that you can create $report object

$report = new MyReport;

Let me know if you need further instruction.

Dustin Tuft commented on Sep 26, 2018

ok so I am still getting the same error.

An uncaught Exception was encountered Type: ParseError

Message: syntax error, unexpected end of file

Filename: /var/www/.../application/controllers/Report.php

Line Number: 61

-Dustin T

KoolReport commented on Sep 26, 2018

What do you have at the line 61?

Dustin Tuft commented on Sep 26, 2018

nothing, thats the last line in the controller file.

Dustin Tuft commented on Sep 26, 2018

Welp C/P error :D left off php on a <? tag

Thanks!

Dustin Tuft commented on Sep 26, 2018

Ok I got the PHP side working, but now my first chart is not rendering, looking closes at the HTML, it seems I have some unexpected token JavaScript errors "Uncaught SyntaxError: Unexpected token <" that are causing as Reference Error "Uncaught ReferenceError: KoolPHPTable is not defined". Oddly enught the table still loads, just the pie chart doesn't

Dustin Tuft commented on Sep 26, 2018

I see the issue, but I have no idea how to change the out put:

 <script type='text/javascript' src='assets/koolreport_assets/517101409/jquery.min.js'></script>
<link type='text/css' rel='stylesheet' href='assets/koolreport_assets/3114327353/table.css'></link>
<script type='text/javascript' src='assets/koolreport_assets/3114327353/table.js'></script>

These are all missing a / at the front, so the web server is trying to load them at https://analytics.----------.com/reports/uiala/ instead of https://analytics.----------.com/

thoughts?

Dustin Tuft commented on Sep 26, 2018

Ok I just set the folder with the URI and folder settings and its fine now, kind of odd, I though the default settings would be correct.

Thanks for the help!

KoolReport commented on Sep 27, 2018

I guess you are using the CodeIgniter package with

use \koolreport\codeigniter\Friendship;

If you are, please open the "koolreport/codeigniter/Friendship.php" and look for this line:

"url"=>"assets/koolreport_assets",

and change it to:

"url"=>"/assets/koolreport_assets",
Dustin Tuft commented on Sep 27, 2018

that worked thanks!!

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
solved

CodeIgniter