Download the PHP package chrmorandi/yii2-jasper without Composer
On this page you can find all versions of the php package chrmorandi/yii2-jasper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chrmorandi/yii2-jasper
More information about chrmorandi/yii2-jasper
Files in chrmorandi/yii2-jasper
Package yii2-jasper
Short Description Create Reports in PHP with JasperReports
License MIT
Homepage https://github.com/chrmorandi/yii2-jasper
Informations about the package yii2-jasper
JasperReports for PHP
Package to generate reports with JasperReports 6 library through JasperStarter v3 command-line tool.
Install
Introduction
This package aims to be a solution to compile and process JasperReports (.jrxml & .jasper files).
Why?
JasperReports is the best open source solution for reporting.
Generating HTML + CSS to make a PDF. Never think about it, that doesn't make any sense! :p
What can I do with this?
Well, everything. JasperReports is a powerful tool for reporting and BI.
From their website:
The JasperReports Library is the world's most popular open source reporting engine. It is entirely written in Java and it is able to use data coming from any kind of data source and produce pixel-perfect documents that can be viewed, printed or exported in a variety of document formats including HTML, PDF, Excel, OpenOffice and Word.
I recommend using Jaspersoft Studio to build your reports, connect it to your datasource (ex: MySQL), loop thru the results and output it to PDF, XLS, DOC, RTF, ODF, etc.
What you can do with Jaspersoft:
- Graphical design environment
- Pixel-perfect report generation
- Output to PDF, HTML, CSV, XLS, TXT, RTF and more
Examples
The Hello World example.
Go to the examples directory in the root of the repository (vendor/chrmorandi/yii2-jasper/examples
).
Open the hello_world.jrxml
file with iReport or with your favorite text editor and take a look at the source code.
Requirements
- Java JDK 8 or higher
- PHP exec() function
- [optional] Mysql Connector (if you want to use Mysql database)
- [optional] PostgreSQL Connector (if you want to use PostgreSQL database)
- [optional] Jaspersoft Studio (to draw and compile your reports)
Installation
Java
Check if you already have Java installed:
If you get:
command not found: java
Then install it with: (Ubuntu/Debian)
Now run the java -version
again and check if the output is ok.
Composer
Install Composer if you don't have it.
Or in your composer.json
file add:
And the just run:
and thats it.
Add the component to the configuration
Use Data Source Name (DSN) for connection information with the database in format like Driver invocation. See http://php.net/manual/pt_BR/pdo.construct.php
Using
MySQL
We ship the MySQL connector (v5.1.39) in the /src/JasperStarter/jdbc/
directory.
PostgreSQL
We ship the PostgreSQL (v9.4-1208) in the /src/JasperStarter/jdbc/
directory.
Performance
Depends on the complexity, amount of data and the resources of your machine.
Is possible generate reports in the background.
License
MIT