simitgroup / phpjasperxml Goto Github PK
View Code? Open in Web Editor NEWThis is a php wysiwyg report library
License: BSD 3-Clause "New" or "Revised" License
This is a php wysiwyg report library
License: BSD 3-Clause "New" or "Revised" License
Hi! I have a problem while I try to connect to postgresql:
the php file looks like this:
debugsql=true; $PHPJasperXML->arrayParameter=array("parameter1"=>1); $PHPJasperXML->load_xml_file("Doctores.jrxml"); //$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db); //* use this line if you want to connect with mysql //if you want to use universal odbc connection, please create a dsn connection in odbc first //$PHPJasperXML->transferDBtoArray($server,"odbcuser","odbcpass","phpjasperxml","odbc"); //odbc = connect to odbc $PHPJasperXML->transferDBtoArray($server,"postgres","postgres","clinica","psql"); //odbc = connect to potgresql $PHPJasperXML->outpage("I"); //page output method I:standard output D:Download file what I am doing wrong?Still in diapers, you can not print variables or expressions myVar = 1 + 6 because the reader xml, just do not read, nor notes footer, "Page" may only be, if it does not say that word then do not write anything in the expression string, need a lexical analysis of the expressions, something like:
$ result = execute_string ("5 + 9 + $ myVar");
Could be some LUA interpreter, Ruby, or anything that can interpret ...
Keep it up !!!
Greetings !!!
Hola:
Aun esta en pañales, no se pueden imprimir variables, ni expresiones myVar = 1 + 6, porque el lector del xml, simplemente no las lee, tampoco las notas del pie de pagina, solo debe decir "Page", si no dice esa palabra entonces no escribe nada en la expresion string, falta un analisis lexico de las expresiones, alpo como:
$resultado = EXECUTE_STRING(" 5 + 9 + $myVar");
Podria ser algun interprete LUA, RUBY, o alguna cosa que pueda interpretarlo...
Sigan adelante !!!
Saludos !!!
I found out that this package exist on packagist, so I went ahead and did composer require composer require simitgroup/phpjasperxml
. However, I get warning for ambiguous file found on vendor. I've attached a screenshot that shows that.
One of the line goes like this:
Warning: Ambiguous class resolution, "pChart\pDraw" was found in both "...vendor/simitgroup/phpjasperxml\pchart2\pChart\pDraw.debug.php" and "...vendor/simitgroup/phpjasperxml\pchart2\pChart\pDraw.php", the first will be used.
I have problem with symfony , maybe is the phat , include or other.
Thanks
HI , I Created a Report in ireport 5.6.0 , In it My Report Preview is Like this
but After Generated PDf with 0.9d Version it like this
And my Designer View is this in it i set
Examination Properity : Position type : Fix Relative to top , Strech type : No Strech , Print Repated Value : True ,
$F{visit_examination Properity : Position type : Fix Relative to top , Strech type : No Strech , Print When Detail Overflow : True , Strech With OVerflow : True.
Lab Properity : Position type :Float , Strech type : No Strech , Print Repated Value : True ,
$F{visit_lab_report} Properity : Position type :float , Strech type : No Strech , Print When Detail Overflow : True , Strech With OVerflow : True.
Subreport View 👍
So What Can be Change in Setting or Any one
I have a simple report with a barcode in the detail band. That barcode is not displayed but all elements do. Can you help me? Is it posible to use barcodes with PHPjasperXML ?
Thanks in advance
using some groovy operators inside the report seems to hide the pdf output, because the previews in jasper working fine. So I guess grooy code inside the fields is not supported, or is it?
I have several cells containing longer text in my DB . In the report preview everything is fine even some linebreaks are correct. But the pdf result only produces one single line so whats going wrong. I do not know the error??
Here the reportpreview
this ist the pdf result with only one line
So do you have any idea whats going wrong?
Thank a lot for your help
hello,
why variable like print page number can't displayed in pdf? i try to edit the design in ireport. but it's work correctly in ireport. i created page number in page footer band.
i created my report using ireport 5.6.0.
Is it possible to use a JSON as data source instead a connection to database?
Using PHPJasperXML-1.0.inc.php
SubReport is displayed when i use v0.8 PHPJasperXMLSubReport.inc.php (with PHP 5.6 or PHP 7) and does not display with the latest v1.0 PHPJasperXMLSubReport.inc.php.
Did something change on SubReport path ?
$P{SUBREPORT_DIR} + "mysubreport.jasper"
With SUBREPORT_DIR = folder/
= folder/mysubreport.jasper
My SubReport :
I could not connect to BD oracle in your project!
Can you help me?
Hi , in Phpjasperxml why i not see some variable in pdf , i can see in preview in ireport but cannot see in php generated pdf
Hi I have the below error when try to print the report from php.
[yii\base\ErrorException:8] exception 'yii\base\ErrorException' with message 'Indirect modification of overloaded element of SimpleXMLElement has no effect' in D:\wamp64\www\master\reports\class\PHPJasperXML-1.0.inc.php:388
below is the line that causing the error :
$this->pointer=&$this->arraygroup[$xml_path["name"]]["groupHeader"];
Can anyone help me or advise on this how to solve it?
Thanks.
Regards,
lvsan
Notice: Undefined property: PHPJasperXML::$footerbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$columnfooterbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$footerbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$columnfooterbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$footerbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$columnfooterbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined variable: linewidth in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1096
Notice: Undefined variable: dash in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1133
Notice: Undefined variable: linewidth in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1096
Notice: Undefined variable: dash in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1133
Notice: Undefined variable: linewidth in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1096
Notice: Undefined variable: dash in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 1133
Notice: Undefined property: PHPJasperXML::$footerbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Notice: Undefined property: PHPJasperXML::$columnfooterbandheight in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 262
Fatal error: Uncaught ArgumentCountError: Too few arguments to function PHPJasperXML::analyse_expression(), 1 passed in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 595 and exactly 3 expected in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php:5511 Stack trace: #0 C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php(595): PHPJasperXML->analyse_expression(Object(SimpleXMLElement)) #1 C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php(440): PHPJasperXML->element_staticText(Object(SimpleXMLElement)) #2 C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php(258): PHPJasperXML->default_handler(Object(SimpleXMLElement)) #3 C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php(166): PHPJasperXML->xml_dismantle(Object(SimpleXMLElement)) #4 C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php(171): PHPJasperXML->load_xml_strin in C:\xampp\htdocs\phpjasperxml-master\PHPJasperXML\class\PHPJasperXML-1.0.inc.php on line 5511 @ @kstan79
Environment: Win10Pro, IIS 10, PHP 7.3.1
I am able to generate PDF, but when trying to output to XLSX following error occurs. please advice. thanks
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ....\tcpdf\tcpdf.php on line 22975
Fatal error: Uncaught Error: Call to undefined function left() in ....\version\1.1\ExportXLS.inc.php on line 1953
I'm use php7.2 +laravel5.6 +MSSQL+phpjasper-laravel(from geekcom)+jaspersoft
Here is my part of code in laravel Controller :
$server = "localhost";
$user="test123";
$pass = "test123";
$db = "test";
$PHPJasperXML = new PHPJasperXML("en","TCPDF");
$PHPJasperXML->arrayParameter=array('para1'=>'1','para2'=>'2');
$PHPJasperXML->load_xml_file(app_path().'/lib/PHPJasperXML/sample1.jrxml');
$dbdriver="sqlsrv";
$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db,$dbdriver);
$PHPJasperXML->outpage('I');
Here is the error i get in laravel :
Please teach me how to fix this kind of error
Thank you very much!
Illegal offset type in C:\xampp\htdocs\phpjasperxml-master\version\1.1\abstractPHPJasperXML.inc.php on line 589
A non-numeric value encountered in C:\xampp\htdocs\phpjasperxml-master\tcpdf\tcpdf.php on line 7324
TCPDF ERROR: Some data has already been output, can't send PDF file
Originally posted by @DrShail23 in #32 (comment)
Hi, I have a problem when generating the output. Please refer to the attached screenshots.
Problem:
Screenshot 1: Generated from PHPJasperXML
Screenshot 2: Generated from Jaspersoft Studio / The output I want
Btw, I should mention that I've seen another similar closed issue, which was about the usage of groovy and overflowed text and I don't think, the problem is the same here. I'm using Java language on Jasper Studio.
Dear Author,
Can you guide regarding correct showing up of sub reports in main report, i can get correct view
in netbeans designer preview but not while generating pdf thorough codeigniter.
I'm attaching my designer preview and code output please review and guide us.
output through Code:
report_name.pdf
Designer Preview:
Hi,
I'm using this for over an year now and its great but there is one major problem i need to overcome. When i put content in the last page footer band it prints on every page not just on the last page. How do i avoid that.
very much needed.
Thanks.
Hello,
I would like to ask you, if it is possible use this project for print documents from XML source instead of DB.
Please, can you try to write me, how can I do it? do you have some example, please?
Thank you
Jan Havranek
Hi i need help in displaying image from mysql, i used the version 9e but it seems the image is not shown in the details section, i used ireport to design my report and all seems well in picture area,i check some documents online and none have resolve this issue, im using PHP 5.6 and im planning to use it on my upcoming project.I Hope someone can help as i'm a big fan of this software.Thanks
Hi again, so I tried a minimal setup like so. I'm using CSV btw:
$input = config('custom.input').'invoice/invoice.jrxml'; // points to JRXML
$output = config('custom.output'); // points to storage/ directory
$PHPJasperXML = new PHPJasperXML('en', 'TCPDF');
$PHPJasperXML->load_xml_file($input);
$dbdriver="PDO"; // using csv from JSS
$PHPJasperXML->outpage('I');
return response()->file($output.'/invoice.pdf', $headers);
This looks like a Java error, so I don't really know where to go with this...
Is this because my $PHPJasperXML don't have $PHPJasperXML->transferDBtoArray()
or $PHPJasperXML->arrayParameter
?
I cloned this repo, try run and i give this error:
Notice: Undefined property: PHPJasperXML::$footerbandheight in /Users/filipecoelho/Sites/phpjasperxml/class/PHPJasperXML.inc.php on line 226
Hi , if i use $F{month_date}.getMonth() this in group expression then it work in ireport but in generated PDf it not work and all Result not seprated by group by month , Is ther any other way to do it , My query is SELECT
SUM(sale_amt) AS month_sale_amt,
SUM(sale_extraamt) AS month_sale_extraamt,
SUM(sale_netamt) AS month_sale_netamt,
DATE_FORMAT(sale_date, '%Y-%m-%d') AS month_date
FROM
ayush_ph.sales
GROUP BY DATE_FORMAT(sale_date, '%Y-%m-%d') , i wan to group result by month . I wan to like this
But Genrated PDf is like this
I wish i could used this package in Laravel.
How to make $PHPJasperXML->transferDBtoArray to connect to Oracle
When Subreport Work in Version 1.1 , And Subrport Suport in only Detail band or work in Other band also ?
Is there any instruction how to setup javabridge?
Hi, I cannot generate and show any PNG image. JPG images work perfectly. When I replacing the image from my local drive image to PNG format, the page got blank white nothing to display and shows error code 500 internal server error. By using IReport I'm able to generate the image. Please assist on this. Thanks.
Originally posted by @DrShail23 in #32 (comment)
I create one report in that report I take only one chart and try to open in a browser I found above error.
for more information please check my attached files.
reports.zip
Hi kstan,
(This is just a question)
I noticed the patterns that's default in Jaspersoft Studio 6.8.0 is not included in abstractPHPJasperXML.inc.php
at line 2559 protected function formatText()
.
For now, the only option is for me to put in my own pattern (the one from Jaspersoft Studio) into abstractPHPJasperXML.inc.php
. The question I'm asking is:
Hi again!
I can't get a multiple columns report. Is it a bug or am I in a mistake with some parameters of report? I need use 2 columns but phpjasperxml always render only one. When I prevew it on iReports it is shown with 2 columns but when phpjasperxml render report only one is displayed.
Thanks in advance
please help me to solve it.......
Fatal error: Uncaught ArgumentCountError: Too few arguments to function PHPJasperXML::analyse_expression(), 1 passed in C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php on line 597 and exactly 3 expected in C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php:5439 Stack trace: #0 C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php(597): PHPJasperXML->analyse_expression(Object(SimpleXMLElement)) #1 C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php(442): PHPJasperXML->element_staticText(Object(SimpleXMLElement)) #2 C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php(259): PHPJasperXML->default_handler(Object(SimpleXMLElement)) #3 C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php(166): PHPJasperXML->xml_dismantle(Object(SimpleXMLElement)) #4 C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php(171): PHPJasperXML->load_xml_string('<?xml version="...') #5 C:\xampp\htdocs\Jinaltech\index.php(30): PHPJasperXML->load_xml_file('123.jrxml') #6 {main} thrown in C:\xampp\htdocs\Jinaltech\class\PHPJasperXML-0.9d.inc.php on line 5439
Dear Ks Tan,
maybe my last question at the moment. Is it possible to use e.g. Calibra as font for the PDF?
load file "rotate.jrxml"
i want to rotate a text label but when i use the parameter Left the export not working
the problem is on variables pdf->k and pdf->h because there are null
is there any solution?
f( $angle!=0 )
{
$angle*=M_PI/180;
$c=cos($angle);
$s=sin($angle);
$cx=$x*$this->pdf->k;
$cy=($this->pdf->h-$y)*$this->pdf->k;
$this->pdf->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm', $c, $s, -$s, $c, $cx, $cy, -$cx, -$cy));
}
Hi, I would like to know if the "List" elements of the Jaspersoft are implemented in the "phpjasperxml-master" library of php, because when I execute it, it does not show any errors but the list is not displayed either.
I am using class 1.1, greetings.
From Brazil,
I can't execute phpjasperxml with fields that have no validation when print; does not obey validation.
sample1.jrxml work properly nice one, I tried to edit Page Header Band in sampple1.jrxml with some of
normaly : in jasper report perspective , StaticText will appeare relatively after TextFiled (Bottom), but in my case with phpjasperxml, StaticText appeared fixed (overwrite view of TextField)
Q:
thnkst for the library :),
I have situation where I run report produced using i-Report.
A main Report contains three sub-reports, and all are working fine when previewing them on Jasper i-Report Design Studio.
I call the main Report using php script. However, sub-reports content not showing at all. As script runs, the main report only displays sub-reports SQL strings on the browser. If I remove sub-reports from the Main Report, then the main report displays nicely.
The same concept used in Java web application and worked just nice; I am not so sure, what I missed out in php. Could anyone help?
Many thanks in advance.
Hi Ks Tan,
well I copied e.g. Calibri.ttf in the same folder with the tcpdf_addfont.php and i wrote a batch like:
D:...mypath...\phpjasperxml-master\tcpdf\tools\tcpdf6\tools\tcpdf_addfont.php -b -t TrueTypeUnicode -f 33 -i Calibri.ttf
I started to run the batch from the dos-box but the font is not generated only firefox opens ... the tcpdf_addfont.php
So what is going wrong maybe I did not get the method correctly.
Best regards Holger
Hi, I'm trying to hide and view an image using "Print With Expression" using this expression called from database $F{students_1a}.contentEquals( "Yes" )
, but not working. Inside Ireport it is working well.
Image 1: Expression declared inside Ireport
Image 2: using Ireport directly the another image hidden and another one showed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.