KoolReport's Forum

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

Want to create a weburl to export data in excel sheet #1827

Open jyoti opened this topic on on Jan 7, 2021 - 1 comments

jyoti commented on Jan 7, 2021

Hello All,

Our requirement is to export data in excel sheet with weburl of different different school.

Suppose we have 5 schools (A, B, C, D, E) they all have a unique ID, now if I want to export data of school A, for that I want to hit a url and which will export data in excel sheet.

Let me know how it can be possible.

Thanks in advance

Sebastian Morales commented on Jan 8, 2021

Create an export.php page which you could link to like this:

https://host/path/to/export.php?school=B

Content of export.php should be:

<?php
    require_once "path/to/MyReport.php";
    $defaultSchool = 'A';
    $school = isset($_GET['school']) ? $_GET['school'] : $defaultSchool;
    $report = new MyReport(array(
        "school" => $school
    ));
    

Then MyReport.php:

<?php
class MyReport extends koolreport\KoolReport
{
    function setup()
    {
        $school = $this->params["school"];
        //pull data according to $school

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