KoolReport's Forum

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

Integrate the koolreport chart in to the existing codeigniter design #385

Open Naga Jothi opened this topic on on Jul 22, 2018 - 1 comments

Naga Jothi commented on Jul 22, 2018

Hi,

I have created the report in codeigniter platform using koolreport library.The report is fine.But I need to integrate this report in to the existing design. I mean koolreport has two files eg.Payment.php and Payment.View.Php. How can I call the existing header,menu to this Payment.view.php from controller file.Please help me.I need to solve this urgently.

KoolReport commented on Jul 22, 2018

There are two ways:

<?php

class Page extends CI_Controller {

   function index()
   {
      $data['page_title'] = 'Your title';
      $this->load->view('header');
      $this->load->view('menu');
      
      $report = new Payment;
      $report->run()->render();

      $this->load->view('footer');
   }

}
?>

or you can do:

<?php

class Page extends CI_Controller {

   function index()
   {
      $data['page_title'] = 'Your title';
      $this->load->view('header');
      $this->load->view('menu');
      
      $report = new Payment;
      $report-.run();
       
       $this->load->view("content",array("report"=>$report));

      $this->load->view('footer');
   }

}
?>

and in the content.php

    <div><?php $report->render(); ?></div>

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

CodeIgniter