Download the PHP package rctnet/jasperphp without Composer

On this page you can find all versions of the php package rctnet/jasperphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jasperphp

alt text

JasperPHP

A pure PHP library to generate reports from JasperSoft Studio (.jrxml files), without the need for a Java bridge or a Jasper Server.

Donate

For more details, documentation, and blog posts, visit jasperphp.com.

Recent Changes & Modernization

This project has undergone a significant modernization effort to align with current PHP best practices. Key changes include:

Requirements

The following PHP extensions are also required:

Installation

Install the library using Composer:

Quick Start

Here is a basic example of how to generate a report. For a more detailed and runnable example, see public/index.php.

Data Sources

You can use different types of data sources to populate your reports.

Array

Pass an array of objects or associative arrays directly.

Database (DB)

Execute a SQL query to fetch data.

JSON or CSV File

Load data from a local .json or .csv file.

Using Embedded SQL Query (from JRXML)

The library also retains the classic JasperReports functionality of executing a SQL query embedded directly within the .jrxml file. When no dataSource is provided in the PHP code, JasperPHP will look for a <queryString> tag inside the report file and execute it using the provided database connection.

This method is especially useful for creating master-detail reports, where a subreport can fetch its own data based on parameters passed from the main report.

Example JRXML (subreport.jrxml):

Example PHP: To run a report with an embedded query, provide the database connection details but omit the 'sql' key from the dataSource.

Output Methods

The output() method provides several ways to deliver the generated report.

Examples:

Supported Formats

Supported JRXML Elements

The library supports a wide range of JRXML tags and components.

TAG/Component Status TAG/Component Status
Basic Elements
Text Field OK Static Text OK
Image OK Break OK
Rectangle OK Line OK
SubReport* OK Barcode OK
Composite Elements
Page Number OK Total Pages OK
Current Date OK Page X of Y OK
Bands
Title OK Page Header OK
Group OK Detail OK
Column Header OK Column Footer OK
Page Footer OK Summary OK
Background OK Style OK
Frame OK Dynamic Table OK

* Subreports are supported recursively and without limits.

Other Features

License

This library is licensed under the MIT License.


All versions of jasperphp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
tecnickcom/tcpdf Version ^6.3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rctnet/jasperphp contains the following files

Loading the files please wait ...