KoolReport's Forum

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

Unable to load or run bootstrap and chart in my office system #1883

Open Abhishek opened this topic on on Jan 30, 2021 - 10 comments

Abhishek commented on Jan 30, 2021

Respected Madam, As per your instruction I am able to run your examples in my local system but I am unable to run the same examples in my office system on windows 10 os. actually, I am unable to load the bootstrap and the chart to the example so could your please help me. I have followed the same instruction where I have followed for my local system. Thanking you in advance

Eugene commented on Jan 30, 2021

Hi,

have you got any error messages?

Abhishek commented on Jan 30, 2021

Yes, unable to load the koolreport.js file and some index issue

Eugene commented on Jan 30, 2021

Are you sure that all paths to koolreport files are correct?

Abhishek commented on Jan 30, 2021

Yes i am sure and I don't changed anything I have copied the whole file as it is which is present in my local system to my office system.

Eugene commented on Jan 30, 2021

So the location of your files is exactly the same on both systems?

Abhishek commented on Jan 30, 2021

Yes, I am able to retrieve the data from data base but not able to load the barchart, table and bootstrap

Eugene commented on Jan 30, 2021

usually, it is the paths issue so I suggest checking it.

Abhishek commented on Jan 30, 2021

If any path issue then it shows an error like file not found in the specificed path but I am able to retrieve the data.

Eugene commented on Jan 30, 2021
  1. The reason is in the differences in your systems, it is difficult to find a reason without any details from your side
  2. What do you mean you are able to retrieve the data? You mean you can do it using kollreport mechanisms or usual PHP ways?
Abhishek commented on Feb 2, 2021

Respected Madam/Sir, This are following errors i am facing and once again i would like to say you that i am able to retrieve the data but not able to display the chart and unable to apply bootstrap.
Not allowed to load local resource: file:///C:/xampp/htdocs/Cloud%20Clinic/salesreport/koolreport_assets/3409401219/KoolReport.js

Uncaught ReferenceError: KoolReport is not defined

Uncaught ReferenceError: KoolReport is not defined

<?php

require_once "../vendor/koolreport/core/autoload.php";

use \koolreport\processes\Group; use \koolreport\processes\Sort; use \koolreport\processes\Limit;

class SalesByCustomer extends \koolreport\KoolReport {

use \koolreport\clients\bootstrap;

public function settings()
{
    return array(
        "dataSources"=>array(
            "sales"=>array(
                "connectionString"=>"mysql:host=localhost;dbname=db_sales",
                "username"=>"root",
                "password"=>"",
                "charset"=>"utf8"
            )
        )
    );
}

public function setup()
{
    $this->src('sales')
    ->query("SELECT customerName,dollar_sales FROM customer_product_dollarsales2")
    ->pipe(new Group(array(
        "by"=>"customerName",
        "sum"=>"dollar_sales"
    )))
    ->pipe(new Sort(array(
        "dollar_sales"=>"desc"
    )))
    ->pipe(new Limit(array(10)))
    ->pipe($this->dataStore('sales_by_customer'));
}

}

?>

<?php

use \koolreport\widgets\google\BarChart;
use \koolreport\widgets\koolphp\Table;

?>

Sales By Customer

This report shows top 10 sales by customer

$this->dataStore('sales_by_customer'), "width"=>"100%", "height"=>"500px", "columns"=>array( "customerName"=>array( "label"=>"Customer" ), "dollar_sales"=>array( "type"=>"number", "label"=>"Amount", "prefix"=>"$", "emphasis"=>true ) ), "options"=>array( "title"=>"Sales By Customer", ) )); ?> $this->dataStore('sales_by_customer'), "columns"=>array( "customerName"=>array( "label"=>"Customer" ), "dollar_sales"=>array( "type"=>"number", "label"=>"Amount", "prefix"=>"$", ) ), "cssClass"=>array( "table"=>"table table-bordered table-striped" ) )); ?>

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

None