Giter VIP home page Giter VIP logo

phpjasperxml's People

Contributors

dependabot[bot] avatar hidayat88 avatar kstan79 avatar safeermtp avatar seansimit avatar simitdev7 avatar vitorota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpjasperxml's Issues

error connecting to postgresql

Hi! I have a problem while I try to connect to postgresql:
image

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?

No print Variables, and varaible expresion

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 !!!

Warning when composer require

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.

Ambiguous class

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.

TextField overlap and subreport not work perfect in 0.9d

HI , I Created a Report in ireport 5.6.0 , In it My Report Preview is Like this
preview_pdf
but After Generated PDf with 0.9d Version it like this
geerated_pdf _0 9d
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.

designer_view
Subreport View 👍
subreport_design
So What Can be Change in Setting or Any one

Barcode problem

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

Differences between Jasper Report Preview and produced PDF

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
blpcahgejpfhmfjh

this ist the pdf result with only one line
gpnidaeemichbnmb

So do you have any idea whats going wrong?

Thank a lot for your help

variable in footer not display

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.

SubReport 0.8 work but v1.0 doesn't work

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 :

facture

BD Oracle

I could not connect to BD oracle in your project!
Can you help me?

Indirect modification of overloaded element of SimpleXMLElement has no effect

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

not working getting error. using XAMPP for Windows 7.1.17 PHP Version 7.1.17

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
image

Unable to generate xlsx

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

Undefined property: PHPJasperXML::$footerbandheight

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 :
image

Please teach me how to fix this kind of error
Thank you very much!

Formatting number fields not working

Number format not displaying on browser but displays on preview

JASPER REPORTS PREVIEW:
Screen Shot 2019-03-12 at 12 10 57 AM

PHP IN BROWSER:
Screen Shot 2019-03-12 at 12 11 50 AM

Format is gone when viewed in browser. How to fix formatting?

problem with generate pdf

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

Different generated output from PHPJasperXML vs Jaspersoft Studio

Hi, I have a problem when generating the output. Please refer to the attached screenshots.

Problem:

  1. Some texts seems to appear in Times New Roman and some in SansSerif randomly
  2. Column Footer elements does not appear

Screenshot 1: Generated from PHPJasperXML

inconsistent font

Screenshot 2: Generated from Jaspersoft Studio / The output I want

original

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.

Last Page Footer not working correctly

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.

phpjasperxml XML source instead DB

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

Unable to diplay image blob in details

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

SimpleDateFormat not found on version 1.1

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...
simpledateformat not found

Is this because my $PHPJasperXML don't have $PHPJasperXML->transferDBtoArray() or $PHPJasperXML->arrayParameter ?

Error while first run

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

Month extract from Mysql Date

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
monthgroup
But Genrated PDf is like this
gnerated

Oracle Support?

How to make $PHPJasperXML->transferDBtoArray to connect to Oracle

Unable to show PNG image inside generated PDF

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.

image

Not included pattern from Jaspersoft Studio

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:

  • Will these patterns be added in future version?
  • Or will we be able to define our own pattern in the future?

References:

Screenshot 1: From abstractPHPJasperXML.inc.php
pattern

Screenshot 2: From Jaspersoft Studio
pattern from jss

Multiple columns

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

error in PHPJasperXML

Hi.
I am trying to use PHPJasperXML on PDO Connection, and I have a lot of errors.
What am I doing wrong?
capture

fatal error

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

text rotation

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));
}

List elements of the Jaspersoft

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.

Can't work with my php7 ?

Hello,

Using sample1.php and WAMP server localhost :

With PHP set to 5.6.31 using v0.9e.inc
0 9e

With PHP set to 7.0.23 using v1.0.inc
1 0
1 0bis

Thank you

Position Type : Float not work

sample1.jrxml work properly nice one, I tried to edit Page Header Band in sampple1.jrxml with some of

  1. TextField with "stretch with overflow" parameter = true (iReport5.1.0), so the height of component is base of value inside.
  2. and in the bottom of that textFiled I put some StaticText with "Position Type" parameter = Float

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:

  1. there are still bugs in this version (1.0) about stretch with overflow and floating component?
    or there are any suggest how to implement stretch with overflow and floating component in phpjasperxml?

thnkst for the library :),

i-Report Sub-report not showing : php

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.

generating font did not work

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

Print With Expression Not Working

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
Image 1: Expression declared inside Ireport

image
Image 2: using Ireport directly the another image hidden and another one showed.

image
image 3: PDF generated didnt hide the 'X' image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.