Skip to content

Commit 7c181a3

Browse files
committed
2.1.14
- make debug sql can show parameter - fix situation report element cant capture uuid cannot render
1 parent 7106dc1 commit 7c181a3

11 files changed

+518
-17
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
4. added ->debugsql(true)
1010
5. more reliable algorithm to parse `expression`
1111

12+
## 2.1.14
13+
- make debug sql can show parameter
14+
- fix situation report element cant capture uuid cannot render
15+
1216

1317
## 2.1.13
1418
- make mongodb driver not compulsory

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "simitsdk/phpjasperxml",
33
"description": "PHP PDF renderer of open source jasper report studio.",
4-
"version": "2.1.13",
4+
"version": "2.1.14",
55
"require": {
66
"php": ">=7.0",
77
"tecnickcom/tc-lib-pdf":"*",
88
"tecnickcom/tcpdf": "^6.4",
99
"fakerphp/faker": "^1.17",
1010
"phpoffice/phpspreadsheet": "^1.20",
11-
"ovidigital/js-object-to-json": "^1.1"
11+
"ovidigital/js-object-to-json": "^1.1",
12+
"ramsey/uuid": "^4.9"
1213
},
1314
"autoload": {
1415
"psr-4": {

composer.lock

Lines changed: 216 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PHPJasperXML_datasource.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,17 @@ public function setDataSource(array $setting):self
3939
}
4040
}
4141

42-
public function debugsql(bool $isdebug) :self {
43-
if($isdebug){
44-
echo '<textarea rows=30 cols=100>' . print_r($this->querystring,true) . '</textarea>';
45-
die;
46-
}
47-
return $this;
42+
public function debugsql(string $sql) :self {
43+
echo '<textarea rows=30 cols=100>' . print_r($sql,true) . '</textarea>';
44+
die;
4845
}
4946
public function fetchData() : self
5047
{
51-
if(isset($_GET['debugsql']) && $_GET['debugsql']=='1'){
52-
$this->debugsql(true);
53-
}
54-
$sql = $this->parseExpression($this->querystring);
5548

49+
$sql = $this->parseExpression($this->querystring);
50+
if(!empty($_REQUEST['debugsql'])){
51+
$this->debugsql($sql);
52+
}
5653
$data =$this->db->fetchData($sql);
5754
if($this->debugdata){
5855
echo "<pre>".print_r($data,true)."</pre>";

src/PHPJasperXML_elements.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ public function draw_subreport(string $uuid,array $prop)
368368
else
369369
{
370370
$subreportExpression = str_replace('.jasper','.jrxml',$subreportExpression);
371-
$filename = $this->path.'/'.$subreportExpression;
371+
if(substr($subreportExpression,0,1)=='/')
372+
$filename = $subreportExpression;
373+
else
374+
$filename = $this->path.'/'.$subreportExpression;
372375
// echo "<pre>".$filename."</pre>";die;
373376

374377
$subreport->load_xml_file($filename);

src/PHPJasperXML_load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
namespace simitsdk\phpjasperxml;
3-
3+
use Ramsey\Uuid\Uuid;
44
use SimpleXMLElement;
55

66
trait PHPJasperXML_load
@@ -368,7 +368,7 @@ protected function getBandChildren($els,string $bandname)
368368

369369
$reportelement = $objvalue->reportElement;
370370
$setting = $this->prop($reportelement);
371-
371+
if(empty($setting['uuid']))$setting['uuid']= Uuid::uuid();
372372
if(!empty($setting['uuid']))
373373
{
374374
$uuid = $setting['uuid'];

vendor/composer/autoload_files.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
return array(
99
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
1010
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
11+
'e39a8b23c42d4e1452234d762b03835a' => $vendorDir . '/ramsey/uuid/src/functions.php',
1112
);

vendor/composer/autoload_psr4.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
return array(
99
'simitsdk\\phpjasperxml\\' => array($baseDir . '/src'),
1010
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
11+
'Ramsey\\Uuid\\' => array($vendorDir . '/ramsey/uuid/src'),
12+
'Ramsey\\Collection\\' => array($vendorDir . '/ramsey/collection/src'),
1113
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
1214
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
1315
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
@@ -28,4 +30,5 @@
2830
'Com\\Tecnick\\File\\' => array($vendorDir . '/tecnickcom/tc-lib-file/src'),
2931
'Com\\Tecnick\\Color\\' => array($vendorDir . '/tecnickcom/tc-lib-color/src'),
3032
'Com\\Tecnick\\Barcode\\' => array($vendorDir . '/tecnickcom/tc-lib-barcode/src'),
33+
'Brick\\Math\\' => array($vendorDir . '/brick/math/src'),
3134
);

0 commit comments

Comments
 (0)