PHPackages                             joaomfrebelo/reports\_4\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. joaomfrebelo/reports\_4\_php

ActiveLibrary

joaomfrebelo/reports\_4\_php
============================

PHP module to Rebelo Reports CLI

3.0.1(3y ago)1151[1 PRs](https://github.com/joaomfrebelo/reports_4_php/pulls)MITPHPPHP 8.0.\* || 8.1.\* || 8.2.\*

Since Feb 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/joaomfrebelo/reports_4_php)[ Packagist](https://packagist.org/packages/joaomfrebelo/reports_4_php)[ Docs](https://github.com/joaomfrebelo/reports_4_php)[ RSS](/packages/joaomfrebelo-reports-4-php/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (6)Versions (7)Used By (0)

Rebelo Reports for PHP
======================

[](#rebeloreports-for-php)

The Rebelo Reports for PHP is the module to run the Rebelo Reports from PHP. You have to have installed Rebelo Reports Cli.

Rebelo Reports
==============

[](#rebeloreports)

Rebelo Reports is a middleware to use the Jasper Reports Framework in the cases that you can not use the Jasper Reports embedded in your software or in cases that your software is not java or there are incompatibility of licences.

Rebelo Reports project in: [https://github.com/joaomfrebelo/reports\_core](https://github.com/joaomfrebelo/reports_core)[https://jitpack.io/#joaomfrebelo/reports\_core](https://jitpack.io/#joaomfrebelo/reports_core)

Rebelo Report CLI project: [https://github.com/joaomfrebelo/reports\_cli](https://github.com/joaomfrebelo/reports_cli)[https://jitpack.io/#joaomfrebelo/reports\_cli](https://jitpack.io/#joaomfrebelo/reports_cli)

To include Reports for PHP in your PHP project (PHP files)
----------------------------------------------------------

[](#to-include-reports-for-php-in-your-php-project-php-files)

Via Composer

```
$ composer require joaomfrebelo/reports_4_php
```

The java jar files of Rebelo Reports CLI should be compiled and instaled from github or jitpack.io

Example using from PHP
----------------------

[](#example-using-from-php)

First rename the file under Config folder config.properties.example to config.properties Then configure the config.properties file with your options. For log4php do the same to logconf.xml.example

```
use Rebelo\Reports\Report\Datasource\Database;
use Rebelo\Test\Reports\Report\Parameter\Parameter;
use Rebelo\Test\Reports\Report\Parameter\Type;
use Rebelo\Reports\Report\JasperFile;
use Rebelo\Reports\Report\Pdf;

$ds = new Database();
$ds->setConnectionString("jdbc:mysql://localhost/sakila");
$ds->setDriver("com.mysql.jdbc.Driver");
$ds->setUser("user");
$ds->setPassword("password");

$parameter = new Parameter(new Type(Type::P_STRING),"parameter name", "parameter value");

$jf = new JasperFile("/path/to/report.jasper", 1);

$pdf = new Pdf();
$pdf->setDatasource($ds);
$pdf->setJasperFile($jf);

$report = new Report();

// Using PChouse reports API

$pdfBase64Encoded = $report->invokeApi($pdf);

// Using Rebelo reports_cli

$pdf->setOutputfile("/path/to/outfile.pdf");
$result = $report->generate($pdf);

if($result->getCode() == 0){
    // exported ok
    // pdf is in /path/to/outfile.pdf
}else{
    // see exitcode
    // see messages with  $result->getMessages();
}
```

Features
--------

[](#features)

### Export to:

[](#export-to)

- PDF
- Digital Sign PDF
- Csv
- Docx
- Html
- Json
- Ods
- Odt
- Pptx
- Rtf
- Text
- Xls
- Xlsx
- Xml
- To printer

### Others

[](#others)

- Export multiple reports as one with the same exporter.
- Export copies of the repoprt at onces with a parametrs of the copy index
- Pass parameters to the report well typed, parameters types:
    - const P\_STRING = "string";
    - const P\_BOOL = "bool";
    - const P\_BOOLEAN = "boolean";
    - const P\_DOUBLE = "double";
    - const P\_FLOAT = "float";
    - const P\_INTEGER = "integer";
    - const P\_LONG = "long";
    - const P\_SHORT = "short";
    - const P\_BIGDECIMAL = "bigdecimal";
    - const P\_DATE = "date";
    - const P\_TIME = "time";
    - const P\_SQL\_TIME = "sqltime";
    - const P\_SQL\_DATE = "sqldate";
    - const P\_TIMESTAMP = "timestamp";

License
-------

[](#license)

Copyright (C) 2019 João M F Rebelo

MIT License

Copyright (c) 2019 João M F Rebelo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~269 days

Total

5

Last Release

1193d ago

Major Versions

1.0.0 → 2.0.02021-02-04

2.0.0 → 3.0.02022-02-28

PHP version history (4 changes)1.0.0-BetaPHP ^7.2

2.0.0PHP ^8.0

3.0.0PHP ^8.0.0

3.0.1PHP 8.0.\* || 8.1.\* || 8.2.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/909b2a0bdc281c7125fc264a04f0da1538f16cbad859501919565f8e21dde18d?d=identicon)[joaomfrebelo](/maintainers/joaomfrebelo)

---

Top Contributors

[![joaomfrebelo](https://avatars.githubusercontent.com/u/2965955?v=4)](https://github.com/joaomfrebelo "joaomfrebelo (5 commits)")

---

Tags

jasperreportsRebeloReports

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/joaomfrebelo-reports-4-php/health.svg)

```
[![Health](https://phpackages.com/badges/joaomfrebelo-reports-4-php/health.svg)](https://phpackages.com/packages/joaomfrebelo-reports-4-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
