KoolReport's Forum

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

Koolreport 4.7 DateRangePicker #1447

Open Serafim Gomes opened this topic on on May 18, 2020 - 8 comments

Serafim Gomes commented on May 18, 2020

After the update koolreport is ignoring options like "alwaysShowCalendars","autoApply"... Every time i load the page it always loads ranges (doesn't need to press the calendar), and when pressed any of the ranges doesn’t do nothing. before: after:

KoolReport commented on May 18, 2020

I will inform dev.team about this issue.

KoolReport commented on May 19, 2020

Due to the issue, we have released Inputs 5.5.1 with the fix and also the KoolReport Pro 4.7.1. Could you please upgrade.

Ravi Chandran R commented on May 30, 2020

We have update the INPUTS 5.5.1 version and KoolReport Pro 4.7.1 using is same problem

KoolReport commented on May 30, 2020

Please use Ctrl+F5 to refresh the page, sometime it is the issue with cache. Also, please check if KoolReport generate a resource folder containing js/css. Those will need deleted.

Ravi Chandran R commented on May 30, 2020

Dear Team,

below my code kindly advice this

myReport.php

use \koolreport\processes\ColumnMeta;
use \koolreport\pivot\processes\Pivot;
use \koolreport\processes\TimeBucket;
use \koolreport\processes\CalculatedColumn;

class ExReport extends \koolreport\KoolReport
{
    
    use \koolreport\bootstrap4\Theme;


    protected function defaultParamValues()
    {
        return array(
            //"dateRange"=>array(date("Y-m-d"),date("Y-m-d")),
	"dateRange"=>array(date("Y-m-d")),      
            //),
        );
    }
    protected function bindParamsToInputs()
    {
        return array(
           
		"dateRange"=>"dateRange",
		            //"dateRange",
        );
    }

myReport.view.php

<?php 
    //use \koolreport\widgets\koolphp\Table;
    use \koolreport\inputs\DateRangePicker;
    //use \koolreport\inputs\MultiSelect;
	use \koolreport\pivot\widgets\PivotMatrix;
        //use \koolreport\pivot\processes\Pivot;
	use \koolreport\pivot\widgets\PivotTable;

?>
<div class="report-content">
    <div class="text-center">
        <h1>List of order</h1>
        <p class="lead">Choose date ranges and customer to view orders</p>
    </div>
    <form method="post">
        <div class="row">
            <div class="col-md-8 offset-md-2">
               <div class="col-md-4 form-group text-center">
                <?php
                DateRangePicker::create(array(
		    "name"=>"dateRange",
		    //"format"=>"MMM DD, YYYY", //Jul 3rd, 2017
		    "ranges"=>array(
			"Today"=>DateRangePicker::today(),
			"Yesterday"=>DateRangePicker::yesterday(),
			"Last 7 days"=>DateRangePicker::last7days(),
			"Last 30 days"=>DateRangePicker::last30days(),
			"This month"=>DateRangePicker::thisMonth(),
			"Last month"=>DateRangePicker::lastMonth(),
		    )
		));
                ?>
                </div>

                <div class="form-group text-center">
                    <button class="btn btn-success"><i class="glyphicon glyphicon-refresh"></i> Load</button>
                </div>
            </div>
        </div>
    </form>


                <?php
	//if($this->dataStore("ExReport")->countData()>0)
   // {
     echo $this->params["dateRange"][0];//, $this->params["dateRange"][0];
        //$dataStore = $this->dataStore('ExReport');
        PivotMatrix::create(array(
            "name" => "PivotMatrix1",
            "dataStore" => $this->dataStore("ExReport"),
            "rowDimension" => "row",
            "columnDimension" => "column",
            "measures"=>array(
                "Total - sum",
                'Total - count',
                // 'dollar_sales - avg',
            ),
            'rowSort' => array(
                'Total - sum' => 'desc',
            ),
            'columnSort' => array(
                'orderMonth' => function ($a, $b) {
                    return (int) $a < (int) $b;
                },
                // 'dollar_sales - sum' => 'desc',
                // 'orderYear' => 'desc',
            ),
            'width' => '100%',
            'paging' => array(
                'size' => 20
            ),
	"options"=>array(
        "alwaysShowCalendars"=>true,
        
    ),
            'hideSubtotalRow' => true,
            'hideSubtotalColumn' => true,
            'showDataHeaders' => true,
        ));
//}
/* else
    {
    ?>
        <div class="alert alert-warning">
            <i class="glyphicon glyphicon-info-sign"></i> Sorry, we found no orders found
        </div>
    <?php    
    }*/
    ?>
        </div>
Ravi Chandran R commented on Jun 1, 2020

Dear Team,

kindly advice above request because i'm in beginner in KoolReport. we have try to date picker show is not properly please need your clear explanation or sample code.

KoolReport commented on Jun 3, 2020

Our dev.team could not replicate the issue. Is there any way you can setup on online that we can see.

Ravi Chandran R commented on Jun 6, 2020

Dear Team,

Above error occur DataPicker them functionality i'm using this below code picker format show

//MyReport.view.php

"themeBase"=>"bs3",

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

Inputs