KoolReport's Forum

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

Table Paging Not Working as expected - error #457

Open Yeshai Bouskila opened this topic on on Sep 11, 2018 - 7 comments

Yeshai Bouskila commented on Sep 11, 2018

Hello,

I'm new to Koolreports but searched the forum, the files I have are as

- Koolreport <- Folder
- Index.php
- addiamrep.php
- addiamrep.view.php

I'm using a simple table view and the records do trim to 15 rows

<?php
Table::create(array(
	"dataStore"=>$this->dataStore("data_addiam_long"),
	 "paging"=>array(
            "pageSize"=>15,
            "align"=>"center",
            "pageIndex"=>0,
        ),
		"cssClass"=>array(
			"table"=>"table table-hover table-bordered table-striped"
		)
));
?>  

But I get no paging numbers...

BTW when I load the example to my server it will not have the paging number as well (Scroll all the way down) http://addiamondsusa.com/addiaminv/examples/reports/basic/table_demo/index.php

David Winterburn commented on Sep 12, 2018

Hi Yeshai,

There's an error on your page. Would you please fix it for us to check the table widget's paging on your server? Thanks!

Yeshai Bouskila commented on Sep 12, 2018

Thanks for the response David, I've corrected the issue can you please review again

Yeshai Bouskila commented on Sep 13, 2018

Any updates? Appreciate any help on this matter

KoolReport commented on Sep 13, 2018

It seems that your server has special settings for DOCUMENT_ROOT so please help me to do this: Please open the file "koolreport/KoolReport.php" and look for this line:

$document_root = str_replace("\\", "/", $_SERVER["DOCUMENT_ROOT"]);

and replace it with 3 following lines:

$script_name = str_replace("\\","/",$_SERVER["SCRIPT_NAME"]);
$script_filename = str_replace("\\","/",$_SERVER["SCRIPT_FILENAME"]);
$document_root = str_replace($script_name,"",$script_filename);

Let me know if it works.

Yeshai Bouskila commented on Sep 13, 2018

Thank you for the response unfortunately that didn't work, here is the function after the update

		$fullLocalPath = str_replace("\\", "/", $fullLocalPath);
		$assets = Utility::get($this->reportSettings,"assets");
		$script_name = str_replace("\\","/",$_SERVER["SCRIPT_NAME"]);
		$script_filename = str_replace("\\","/",$_SERVER["SCRIPT_FILENAME"]);
		$document_root = str_replace($script_name,"",$script_filename);		
		$assetUrl = "";

As you can see no go on both the paging and sliders http://www.addiamondsusa.com/addiaminv/index.php

KoolReport commented on Sep 13, 2018

That's strange. I will contact you by email on this issue

KoolReport commented on Sep 13, 2018

Could you please look for the line

$script_filename = str_replace("\\","/",$_SERVER["SCRIPT_FILENAME"]);

and replace it with

$script_filename = str_replace("\\","/",realpath($_SERVER["SCRIPT_FILENAME"]));

Please let me know if it works.

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

Morris Chart