feat: commit vendor folder directly to bypass air-gapped build restrictions
This commit is contained in:
+125
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"files": [
|
||||
"README.md"
|
||||
],
|
||||
"imageSize": 100,
|
||||
"commit": false,
|
||||
"contributors": [
|
||||
{
|
||||
"login": "geekcom",
|
||||
"name": "Daniel Rodrigues",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/3955933?v=4",
|
||||
"profile": "https://twitter.com/geekcom2",
|
||||
"contributions": [
|
||||
"infra",
|
||||
"maintenance",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lavela",
|
||||
"name": "Leandro Bitencourt",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/13982234?v=4",
|
||||
"profile": "http://www.leandrobitencourt.com.br",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "vitormattos",
|
||||
"name": "Vitor Mattos",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1079143?v=4",
|
||||
"profile": "https://github.com/vitormattos",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "rafaelqueiroz",
|
||||
"name": "Rafael Queiroz",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/275919?v=4",
|
||||
"profile": "https://github.com/rafaelqueiroz",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dbould",
|
||||
"name": "Dave Bould",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5477476?v=4",
|
||||
"profile": "http://dave.codes",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "ThiagoAlves31",
|
||||
"name": "ThiagoAlves31",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/32931011?v=4",
|
||||
"profile": "https://github.com/ThiagoAlves31",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "jadsonbr",
|
||||
"name": "Jadson Ribeiro",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/10354607?v=4",
|
||||
"profile": "http://www.jadsonbr.com.br",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "boaglio",
|
||||
"name": "Fernando Boaglio",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/6140?v=4",
|
||||
"profile": "http://www.boaglio.com",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "xRahul",
|
||||
"name": "Rahul Jain",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1639945?v=4",
|
||||
"profile": "https://rahulja.in",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "lecneri",
|
||||
"name": "Luiz Eduardo",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/431453?v=4",
|
||||
"profile": "https://github.com/lecneri",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "davidribeiro",
|
||||
"name": "David Ribeiro",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/11426456?v=4",
|
||||
"profile": "https://github.com/davidribeiro",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "allenjd3",
|
||||
"name": "James Allen",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/8092154?v=4",
|
||||
"profile": "https://allenjd3.github.io",
|
||||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
"projectName": "phpjasper",
|
||||
"projectOwner": "PHPJasper",
|
||||
"repoType": "github",
|
||||
"repoHost": "https://github.com",
|
||||
"skipCi": true
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
# for php-coveralls
|
||||
service_name: travis-ci
|
||||
coverage_clover: tests/log/clover.xml
|
||||
json_path: tests/log/coveralls-upload.json
|
||||
@@ -0,0 +1 @@
|
||||
custom: https://nubank.com.br/pagar/518o5/zVBzxd00Sb
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,13 @@
|
||||
/vendor
|
||||
/tests/log
|
||||
phpunit.xml
|
||||
*.jasper
|
||||
*.cache
|
||||
|
||||
# IDE
|
||||
## Eclipse
|
||||
.buildpath
|
||||
.project
|
||||
.settings
|
||||
## PHPStorm
|
||||
.idea/
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4
|
||||
- 8.0
|
||||
|
||||
before_script:
|
||||
- composer self-update
|
||||
- travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader
|
||||
- composer install --prefer-source --no-interaction --dev
|
||||
- echo 'xdebug.mode = coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
script:
|
||||
- composer test
|
||||
|
||||
after_success:
|
||||
- php vendor/bin/php-coveralls --verbose
|
||||
Vendored
+104
@@ -0,0 +1,104 @@
|
||||
Release Notes - PHPJasper - Version 3.4.0
|
||||
========================================================
|
||||
* Update
|
||||
* Exception::__construct(): Passing null to parameter #2 ($code) of type int is deprecated (Solved)
|
||||
* Capture JasperStarter errors and include them in ErrorCommandExecutable exception message
|
||||
* PathExecutable parameter
|
||||
* Update composer libs
|
||||
* Update phpjasper docker image
|
||||
* Update doc
|
||||
________________________________________________
|
||||
Release Notes - PHPJasper - Version 3.3.0
|
||||
========================================================
|
||||
* Improvement
|
||||
* add support to coverage tests
|
||||
* add support to travisCI
|
||||
* Static Analysis with phpstan
|
||||
* add phpunit.xml.dist
|
||||
* new badges
|
||||
________________________________________________
|
||||
Release Notes - PHPJasper - Version 3.2.0
|
||||
========================================================
|
||||
* Improvement
|
||||
* minimum PHP version now is 7.2
|
||||
https://www.php.net/supported-versions.php
|
||||
* phpunit minimal now is 8.*
|
||||
* Update
|
||||
* suggested jdbc drivers in the folder bin/jasperstarter/jdbc
|
||||
* update tests and phpunit.xml
|
||||
* docs
|
||||
* Remove
|
||||
* break test
|
||||
________________________________________________
|
||||
Release Notes - PHPJasper - Version 3.1.0
|
||||
========================================================
|
||||
* Improvement
|
||||
* added printOutput() method
|
||||
* Refactoring
|
||||
* output() method
|
||||
________________________________________________________
|
||||
Release Notes - PHPJasper - Version 3.0.0
|
||||
========================================================
|
||||
* Improvement
|
||||
* added Semantic Versioning 2.0.0
|
||||
* Update
|
||||
* updated for jasperstarter 3.5.0
|
||||
* Bug
|
||||
* solved problems with useSSL at MySQL connections
|
||||
________________________________________________________
|
||||
Release Notes - PHPJasper - Version 2.7
|
||||
========================================================
|
||||
* Improvement https://github.com/PHPJasper/phpjasper/issues/99
|
||||
* improvement in resource '-r' parameter,
|
||||
it's no longer necessary to be connected in database
|
||||
to use resources
|
||||
________________________________________________________
|
||||
Release Notes - PHPJasper - Version 2.6
|
||||
========================================================
|
||||
* Update
|
||||
* updated for jasperstarter 3.2.1
|
||||
________________________________________________________
|
||||
Release Notes - PHPJasper - Version 2.5
|
||||
========================================================
|
||||
* https://github.com/PHPJasper/phpjasper/pull/77
|
||||
* https://github.com/PHPJasper/phpjasper/pull/78
|
||||
* https://github.com/PHPJasper/phpjasper/pull/79
|
||||
* https://github.com/PHPJasper/phpjasper/pull/80
|
||||
________________________________________________________
|
||||
|
||||
Release Notes - PHPJasper - Version 2.2
|
||||
========================================================
|
||||
* Improvement: https://github.com/PHPJasper/phpjasper/issues/30
|
||||
* add support for resource option
|
||||
________________________________________________________
|
||||
|
||||
Release Notes - PHPJasper - Version 2.1
|
||||
========================================================
|
||||
* Refactoring
|
||||
* strict types activate
|
||||
* add type declarations
|
||||
________________________________________________________
|
||||
Release Notes - PHPJasper - Version 2.0
|
||||
========================================================
|
||||
* Improvement
|
||||
* Support php 7.1 above
|
||||
________________________________________________________
|
||||
|
||||
Release Notes - PHPJasper - Version 1.15
|
||||
========================================================
|
||||
* Improvement
|
||||
* Updated JasperStarter to Version 3.1.0
|
||||
________________________________________________________
|
||||
|
||||
Release Notes - JasperStarter - Version 3.1.0
|
||||
========================================================
|
||||
|
||||
* New Feature
|
||||
* [JAS-83] - JSON file as a data source
|
||||
|
||||
* Task
|
||||
* [JAS-95] - Include JasperReports 6.4.0
|
||||
|
||||
* Improvement
|
||||
* [JAS-84] - How to pass $P{XML_DATA_DOCUMENT} to sub report - additional documentation
|
||||
________________________________________________________
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at danielrodrigues-ti@hotmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
# Contributing
|
||||
|
||||
1. Fork it
|
||||
2. Create your feature branch : `git checkout -b my_new_feature`
|
||||
3. Commit your changes: `git commit -m "Add some feature"`
|
||||
4. Push to the branch `git push origin my_new_feature`
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Hélder Duarte
|
||||
Copyright (c) 2015 Daniel Rodrigues Lima (geekcom)
|
||||
Copyright (c) 2015 Leandro Bitencourt
|
||||
|
||||
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.
|
||||
Vendored
+377
@@ -0,0 +1,377 @@
|
||||

|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
|
||||
# PHPJasper
|
||||
_A PHP Report Generator_
|
||||
|
||||
[](https://app.travis-ci.com/github/PHPJasper/phpjasper)
|
||||
[](https://coveralls.io/github/PHPJasper/phpjasper?branch=master)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://php.net/)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://github.com/phpstan/phpstan)
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
### Docs
|
||||
|
||||
[](https://github.com/PHPJasper/phpjasper/blob/master/docs/pt_BR/LEIA-ME_pt_BR.md)
|
||||
|
||||
> ### Please consider **[make a donation](https://blockchain.com/btc/payment_request?address=1MDkixV6Xn9yQoKLDLdznLwmbKrJ9VAThj&amount=0.00001737&message=PHPJasper_Support)**, support our activities
|
||||
|
||||
### About
|
||||
PHPJasper is the best solution to compile and process JasperReports (.jrxml & .jasper files) just using PHP, in short: to generate reports using PHP.
|
||||
|
||||
#### Our channel on discord
|
||||
https://discord.gg/7FpDnQ
|
||||
|
||||
**Notes:**
|
||||
* PHPJasper Can be used regardless of your PHP Framework
|
||||
* For PHP versions less than 7.0 see: [v1.16](https://github.com/PHPJasper/phpjasper/releases/tag/v1.16)
|
||||
* [Here](https://github.com/PHPJasper/examples) are several examples of how to use PHPJasper
|
||||
|
||||
### Why PHPJasper?
|
||||
|
||||
Did you ever had to create a good looking Invoice with a lot of fields for your great web app?
|
||||
|
||||
I had to, and the solutions out there were not perfect. Generating *HTML* + *CSS* to make a *PDF*? That doesn't make any sense! :)
|
||||
|
||||
Then I found **JasperReports** the best open source solution for reporting.
|
||||
|
||||
### 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.
|
||||
|
||||
It is recommended using [Jaspersoft Studio](http://community.jaspersoft.com/project/jaspersoft-studio) to build your reports, connect it to your datasource (ex: MySQL, POSTGRES), loop thru the results and output it to PDF, XLS, DOC, RTF, ODF, etc.
|
||||
|
||||
*Some examples of what you can do:*
|
||||
|
||||
* Invoices
|
||||
* Reports
|
||||
* Listings
|
||||
|
||||
## Requirements
|
||||
|
||||
* PHP 7.2 or above
|
||||
* Java JDK 1.8
|
||||
|
||||
## Optional
|
||||
|
||||
* Any `jdbc` drivers to generate reports from a database (MySQL, PostgreSQL, MSSQL...), must be copied to a folder `bin/jasperstarter/jdbc`
|
||||
* We ship the [PostgreSQL](https://jdbc.postgresql.org/) (42.2.9) in the `bin/jasperstarter/jdbc` directory.
|
||||
* We ship the [MySQL connector](http://dev.mysql.com/downloads/connector/j/) (v5.1.48) in the `bin/jasperstarter/jdbc` directory.
|
||||
* [Microsoft JDBC Drivers SQL Server
|
||||
](https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver15).
|
||||
* [Jaspersoft Studio](http://community.jaspersoft.com/project/jaspersoft-studio) (to draw your reports).
|
||||
|
||||
## Installation
|
||||
|
||||
Install [Composer](http://getcomposer.org) if you don't have it.
|
||||
```
|
||||
composer require geekcom/phpjasper
|
||||
```
|
||||
Or in your file'composer.json' add:
|
||||
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
"geekcom/phpjasper": "^3.4.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
And the just run:
|
||||
|
||||
composer install
|
||||
|
||||
and thats it.
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
## PHPJasper with Docker
|
||||
|
||||
With Docker CE and docker-compose installed just run:
|
||||
|
||||
* `docker-compose up -d`
|
||||
* `docker exec -it phpjasper composer install`
|
||||
|
||||
To execute tests:
|
||||
|
||||
* `docker exec -it phpjasper sudo composer test` or
|
||||
* `docker exec -it phpjasper sudo composer testdox`
|
||||
|
||||
To see coverage manually of tests, execute the file: `tests/log/report/index.html`
|
||||
|
||||
_Help us writing new tests, make a fork_ :)
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
## Examples
|
||||
|
||||
### The *Hello World* example.
|
||||
|
||||
Go to the examples directory in the root of the repository (`vendor/geekcom/phpjasper/examples`).
|
||||
Open the `hello_world.jrxml` file with Jaspersoft Studio or with your favorite text editor and take a look at the source code.
|
||||
|
||||
#### Compiling
|
||||
|
||||
First we need to compile our `JRXML` file into a `JASPER` binary file. We just have to do this one time.
|
||||
|
||||
**Note 1:** You don't need to do this step if you are using *Jaspersoft Studio*. You can compile directly within the program.
|
||||
|
||||
```php
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jrxml';
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
$jasper->compile($input)->execute();
|
||||
```
|
||||
|
||||
This commando will compile the `hello_world.jrxml` source file to a `hello_world.jasper` file.
|
||||
|
||||
#### Processing
|
||||
|
||||
Now lets process the report that we compile before:
|
||||
|
||||
```php
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jasper';
|
||||
$output = __DIR__ . '/vendor/geekcom/phpjasper/examples';
|
||||
$options = [
|
||||
'format' => ['pdf', 'rtf']
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
Now check the examples folder! :) Great right? You now have 2 files, `hello_world.pdf` and `hello_world.rtf`.
|
||||
|
||||
Check the *methods* `compile` and `process` in `src/JasperPHP.php` for more details
|
||||
|
||||
#### Listing Parameters
|
||||
|
||||
Querying the jasper file to examine parameters available in the given jasper report file:
|
||||
|
||||
```php
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world_params.jrxml';
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
$output = $jasper->listParameters($input)->execute();
|
||||
|
||||
foreach($output as $parameter_description)
|
||||
print $parameter_description . '<pre>';
|
||||
```
|
||||
|
||||
### Using database to generate reports
|
||||
|
||||
We can also specify parameters for connecting to database:
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'locale' => 'en',
|
||||
'params' => [],
|
||||
'db_connection' => [
|
||||
'driver' => 'postgres', //mysql, ....
|
||||
'username' => 'DB_USERNAME',
|
||||
'password' => 'DB_PASSWORD',
|
||||
'host' => 'DB_HOST',
|
||||
'database' => 'DB_DATABASE',
|
||||
'port' => '5432'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
**Note 2:**
|
||||
|
||||
For a complete list of locales see [Supported Locales](http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html)
|
||||
|
||||
### Using MSSQL DataBase
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper or .jrxml';
|
||||
$output = '/your_output_path';
|
||||
$jdbc_dir = __DIR__ . '/vendor/geekcom/phpjasper/bin/jaspertarter/jdbc';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'locale' => 'en',
|
||||
'params' => [],
|
||||
'db_connection' => [
|
||||
'driver' => 'generic',
|
||||
'host' => '127.0.0.1',
|
||||
'port' => '1433',
|
||||
'database' => 'DataBaseName',
|
||||
'username' => 'UserName',
|
||||
'password' => 'password',
|
||||
'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
|
||||
'jdbc_url' => 'jdbc:sqlserver://127.0.0.1:1433;databaseName=Teste',
|
||||
'jdbc_dir' => $jdbc_dir
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
### Reports from a XML
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
$data_file = __DIR__ . '/your_data_files_path/your_xml_file.xml';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'params' => [],
|
||||
'locale' => 'en',
|
||||
'db_connection' => [
|
||||
'driver' => 'xml',
|
||||
'data_file' => $data_file,
|
||||
'xml_xpath' => '/your_xml_xpath'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
### Reports from a JSON
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
|
||||
$data_file = __DIR__ . '/your_data_files_path/your_json_file.json';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'params' => [],
|
||||
'locale' => 'en',
|
||||
'db_connection' => [
|
||||
'driver' => 'json',
|
||||
'data_file' => $data_file,
|
||||
'json_query' => 'your_json_query'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
Depends on the complexity, amount of data and the resources of your machine (let me know your use case).
|
||||
|
||||
I have a report that generates a *Invoice* with a DB connection, images and multiple pages and it takes about **3/4 seconds** to process. I suggest that you use a worker to generate the reports in the background.
|
||||
|
||||
## Thanks
|
||||
|
||||
[Cenote GmbH](http://www.cenote.de/) for the [JasperStarter](http://jasperstarter.sourceforge.net/) tool.
|
||||
|
||||
[JetBrains](https://www.jetbrains.com/) for the [PhpStorm](https://www.jetbrains.com/phpstorm/) and all great tools.
|
||||
|
||||
|
||||
## [Questions?](https://github.com/PHPJasper/phpjasper/issues)
|
||||
|
||||
Open a new [Issue](https://github.com/PHPJasper/phpjasper/issues) or look for a closed issue
|
||||
|
||||
|
||||
## [License](https://github.com/PHPJasper/phpjasper/blob/master/LICENSE)
|
||||
|
||||
MIT
|
||||
|
||||
## [Contribute](https://github.com/PHPJasper/phpjasper/blob/master/CONTRIBUTING.md)
|
||||
## Contributors ✨
|
||||
|
||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/geekcom2"><img src="https://avatars2.githubusercontent.com/u/3955933?v=4" width="100px;" alt=""/><br /><sub><b>Daniel Rodrigues</b></sub></a><br /><a href="#infra-geekcom" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-geekcom" title="Maintenance">🚧</a> <a href="https://github.com/PHPJasper/phpjasper/commits?author=geekcom" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://www.leandrobitencourt.com.br"><img src="https://avatars2.githubusercontent.com/u/13982234?v=4" width="100px;" alt=""/><br /><sub><b>Leandro Bitencourt</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=lavela" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/vitormattos"><img src="https://avatars3.githubusercontent.com/u/1079143?v=4" width="100px;" alt=""/><br /><sub><b>Vitor Mattos</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=vitormattos" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/rafaelqueiroz"><img src="https://avatars0.githubusercontent.com/u/275919?v=4" width="100px;" alt=""/><br /><sub><b>Rafael Queiroz</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=rafaelqueiroz" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://dave.codes"><img src="https://avatars0.githubusercontent.com/u/5477476?v=4" width="100px;" alt=""/><br /><sub><b>Dave Bould</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=dbould" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/ThiagoAlves31"><img src="https://avatars1.githubusercontent.com/u/32931011?v=4" width="100px;" alt=""/><br /><sub><b>ThiagoAlves31</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=ThiagoAlves31" title="Code">💻</a></td>
|
||||
<td align="center"><a href="http://www.jadsonbr.com.br"><img src="https://avatars3.githubusercontent.com/u/10354607?v=4" width="100px;" alt=""/><br /><sub><b>Jadson Ribeiro</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=jadsonbr" title="Code">💻</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://www.boaglio.com"><img src="https://avatars0.githubusercontent.com/u/6140?v=4" width="100px;" alt=""/><br /><sub><b>Fernando Boaglio</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=boaglio" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://rahulja.in"><img src="https://avatars3.githubusercontent.com/u/1639945?v=4" width="100px;" alt=""/><br /><sub><b>Rahul Jain</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=xRahul" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/lecneri"><img src="https://avatars2.githubusercontent.com/u/431453?v=4" width="100px;" alt=""/><br /><sub><b>Luiz Eduardo</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=lecneri" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/davidribeiro"><img src="https://avatars0.githubusercontent.com/u/11426456?v=4" width="100px;" alt=""/><br /><sub><b>David Ribeiro</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=davidribeiro" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://allenjd3.github.io"><img src="https://avatars3.githubusercontent.com/u/8092154?v=4" width="100px;" alt=""/><br /><sub><b>James Allen</b></sub></a><br /><a href="https://github.com/PHPJasper/phpjasper/commits?author=allenjd3" title="Code">💻</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||
+435
@@ -0,0 +1,435 @@
|
||||
|
||||
JasperStarter - Running JasperReports from command line
|
||||
========================================================
|
||||
|
||||
Release notes - JasperStarter - Version 3.5.0
|
||||
---------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-134] - "InterruptedException" should not be ignored in App.java
|
||||
* [JAS-135] - comparisons between unrelated types in Config.java
|
||||
|
||||
** New Feature
|
||||
* [JAS-131] - Jasperstarter does not provide a way to use the query string saved in the report itself
|
||||
|
||||
** Task
|
||||
* [JAS-133] - Release Pipeline takes longer than before
|
||||
* [JAS-136] - Throwable.printStackTrace(...) should not be called in Report.java setLookAndFeel()
|
||||
* [JAS-137] - Do not use a bitwise operator with a Boolean-like operand in ParameterPanel.java
|
||||
* [JAS-138] - Do not use a bitwise operator with a Boolean-like operand in ParameterPrompt.java
|
||||
|
||||
|
||||
Release notes - JasperStarter - Version 3.4.1
|
||||
---------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-132] - Security alert on org.springframework:spring-core
|
||||
Updated springframework to 4.3.21
|
||||
|
||||
CVE-2016-5007 - moderate severity - Vulnerable versions: < 4.3.1
|
||||
CVE-2018-1275 - high severity - Vulnerable versions: < 4.3.16
|
||||
CVE-2018-1272 - moderate severity - Vulnerable versions: < 4.3.15
|
||||
CVE-2018-1271 - moderate severity - Vulnerable versions: < 4.3.15
|
||||
CVE-2018-1270 - high severity - Vulnerable versions: < 4.3.16
|
||||
CVE-2018-1257 - moderate severity - Vulnerable versions: < 4.3.17
|
||||
|
||||
|
||||
Release notes - JasperStarter - Version 3.4.0
|
||||
---------------------------------------------
|
||||
|
||||
JasperStarter-3.2.0 silently dropped Java7 support by using the
|
||||
latest available JasperReports Library.
|
||||
JasperReports-6.4.0 is the last release which works with Java7 so
|
||||
JasperStarter-3.1.0 was the latest release supporting Java7.
|
||||
|
||||
Now JasperStarter needs Java8 at a minimum and is manually tested
|
||||
with OpenJDK-8, OpenJDK-10, OpenJDK-11. Automatic testing is on the
|
||||
way (see JAS-128).
|
||||
There will be a special release supporting Java7.
|
||||
|
||||
"Diskless" operation using stdin and stdout for input data and
|
||||
output is now complete. See ([JAS-97] and [JAS-89]).
|
||||
|
||||
A public API allows direct integration with Python using jpy
|
||||
([JAS-125]).
|
||||
|
||||
Known bugs:
|
||||
* [JAS-120] - JasperReports-6.7.0 Version does not match with
|
||||
reported version from the jar file in
|
||||
This is an upstream error which causes JasperStarter to put out
|
||||
a wrong JasperReports version number of 6.6.0 instead of 6.7.0
|
||||
if you call: jasperstarter -V
|
||||
|
||||
** Bug
|
||||
* [JAS-111] - JRE 1.7 incompatibility - not fixed in the main
|
||||
release but clarified.
|
||||
* [JAS-122] - Runtime error if a chart with "chart customizers" is
|
||||
used
|
||||
* [JAS-126] - Jasperstarter does not usefully propagate
|
||||
compilation errors
|
||||
|
||||
** New Feature
|
||||
* [JAS-97] - Use stdout for the resulting PDF (so we don't have to
|
||||
write to the hosting server's storage)
|
||||
* [JAS-125] - Make report fill accessible via API
|
||||
|
||||
** Task
|
||||
* [JAS-127] - Enable dependency caching in build pipeline
|
||||
* [JAS-129] - Remove test dependency to font Arial
|
||||
* [JAS-130] - launch4j-maven-plugin:1.5.2 depends on 32bit
|
||||
libraries
|
||||
|
||||
|
||||
Release notes - JasperStarter - Version 3.3.0
|
||||
---------------------------------------------
|
||||
|
||||
Known bugs:
|
||||
* [JAS-120] - JasperReports-6.7.0 Version does not match with reported version from the jar file in
|
||||
This is an upstream error which causes JasperStarter to put out
|
||||
a wrong JasperReports version number of 6.6.0 instead of 6.7.0
|
||||
if you call: jasperstarter -V
|
||||
|
||||
** Bug
|
||||
* [JAS-116] - SSL error
|
||||
* [JAS-121] - Container 'Build' exceeded memory limit.
|
||||
* [JAS-122] - Runtime error if a chart with "chart customizers" is used
|
||||
|
||||
** New Feature
|
||||
* [JAS-113] - JSONQL data source support
|
||||
|
||||
** Task
|
||||
* [JAS-102] - Pipeline: enable build artifact upload to download section
|
||||
* [JAS-119] - Include JasperReports-6.7.0
|
||||
|
||||
** Improvement
|
||||
* [JAS-89] - Accept stdin for datafile input
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 3.2.1
|
||||
---------------------------------------------
|
||||
|
||||
** Task
|
||||
* [JAS-109] - Include JasperReports-6.4.3
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 3.2.0
|
||||
---------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-96] - Enable JavaScript in expression
|
||||
* [JAS-99] - jasperreports-functions not in maven central
|
||||
* [JAS-100] - Pipeline build failed: Font "Arial" is not available to the JVM
|
||||
* [JAS-101] - Pipeline build failed: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program
|
||||
* [JAS-107] - JasperStarter could not run reports with Barcode4J barcodes
|
||||
|
||||
** Task
|
||||
* [JAS-108] - Include JasperReports 6.4.1
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 3.1.0
|
||||
---------------------------------------------
|
||||
|
||||
** New Feature
|
||||
* [JAS-83] - JSON file as a data source
|
||||
|
||||
** Task
|
||||
* [JAS-95] - Include JasperReports 6.4.0
|
||||
|
||||
** Improvement
|
||||
* [JAS-84] - How to pass $P{XML_DATA_DOCUMENT} to sub report - additional documentation
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 3.0.0
|
||||
---------------------------------------------
|
||||
|
||||
This Release works with Java8.
|
||||
|
||||
** Bug
|
||||
* [JAS-69] - Calls of assertEquals have the arguments actual and
|
||||
expected interchanged
|
||||
* [JAS-70] - Example report csv.jrxml truncates data
|
||||
* [JAS-80] - jasperstarter by default is missing some important
|
||||
jasper studio builtin libraries
|
||||
* [JAS-81] - Eclipse compiler error when running using Java 8
|
||||
|
||||
** Improvement
|
||||
* [JAS-68] - Expand documentation with calls of running the
|
||||
example reports
|
||||
|
||||
** New Feature
|
||||
* [JAS-67] - Ability to produce CSV Metadata reports
|
||||
* [JAS-72] - Ability to produce XLS Metadata reports
|
||||
|
||||
** Task
|
||||
* [JAS-57] - Switching from Mercurial to Git
|
||||
* [JAS-59] - Include JasperReports 6.0.0
|
||||
* [JAS-61] - update dependencies
|
||||
* [JAS-65] - Include JasperReports 6.0.2
|
||||
* [JAS-66] - Include JasperReports 6.0.3
|
||||
* [JAS-76] - Git version and revision information in manifest file
|
||||
* [JAS-79] - Include JasperReports 6.0.4
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.2.2
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-63] - Version 2.2 WindowsSetup replace the path variable
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.2.1
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-58] - DB type generic should not require a username
|
||||
* [JAS-62] - Linux startup script does not work if called via symlink
|
||||
|
||||
** Task
|
||||
* [JAS-57] - Switching from Mercurial to Git (Branch Jasperstarter-2.2)
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.2.0
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-54] - Eclipse complains: Plugin execution not covered by
|
||||
lifecycle configuration
|
||||
|
||||
** New Feature
|
||||
* [JAS-56] - Support for XML data sources
|
||||
|
||||
** Task
|
||||
* [JAS-48] - Rewrite api calls deprecated since JasperReports 5.6.0
|
||||
* [JAS-49] - Rewrite code reported by -Xlint:unchecked
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.1.2
|
||||
---------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-53] - Property net.sf.jasperreports.export.xls.one.page.per.sheet was overrided
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.1.1
|
||||
----------------------------------------------
|
||||
|
||||
** Task
|
||||
* [JAS-52] - Include JasperReports 5.6.1
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.1.0
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-40] - No page title is set in index.html
|
||||
|
||||
** New Feature
|
||||
* [JAS-50] - Accept number of copies when printing
|
||||
|
||||
** Task
|
||||
* [JAS-47] - Include JasperReports 5.6.0
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 2.0.0
|
||||
----------------------------------------------
|
||||
|
||||
The command line syntax has changed in this release!
|
||||
<input> is now an argument and the format of report parameters has changed.
|
||||
Specifying the parameter type is no longer necessary. The type is determined
|
||||
from the report and it is no longer possible to provide a non existent
|
||||
parameter.
|
||||
The major new feature is support for csv files as a datasource.
|
||||
|
||||
** Bug
|
||||
* [JAS-37] - The artifact org.apache.commons:commons-io:jar:1.3.2 has been
|
||||
relocated to commons-io:commons-io:jar:1.3.2
|
||||
* [JAS-41] - Command "jasperstarter params" gives no useful result if param
|
||||
has no description
|
||||
|
||||
** Improvement
|
||||
* [JAS-15] - Report parameters should be handled in a more generic way
|
||||
* [JAS-42] - Accept <input> as positional argument instead of an option
|
||||
|
||||
** New Feature
|
||||
* [JAS-30] - CSV as a datasource for Jasperstarter
|
||||
|
||||
** Task
|
||||
* [JAS-23] - create unit test
|
||||
* [JAS-24] - create example reports
|
||||
* [JAS-34] - site translation de for release 2.0
|
||||
* [JAS-35] - site translation cz for release 2.0
|
||||
* [JAS-38] - Update build dependencies
|
||||
* [JAS-39] - Include JasperReports 5.2.0
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.4.2
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-41] - Command "jasperstarter params" gives no useful result
|
||||
if param has no description
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.4.1
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-33] - Report parameter with space produces error on Unix
|
||||
like systems
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.4.0
|
||||
----------------------------------------------
|
||||
|
||||
** Bug
|
||||
* [JAS-29] - Documentation typo java.awt.image
|
||||
|
||||
** Task
|
||||
* [JAS-31] - Include JasperReports 5.1.2
|
||||
* [JAS-32] - Include argparse4j 0.4.1
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.3.0
|
||||
----------------------------------------------
|
||||
|
||||
This release is mainly due to the new JasperReports library version 5.1.0.
|
||||
|
||||
** Improvement
|
||||
* [JAS-28] - Include argparse4j 0.4.0 which introduces some features to the
|
||||
user
|
||||
- Argument abbreviations
|
||||
- Subcommand abbreviations
|
||||
|
||||
** Task
|
||||
* [JAS-27] - Include JasperReports 5.1.0
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.2.0
|
||||
----------------------------------------------
|
||||
|
||||
This release is mainly due to the new JasperReports library version 5.0.4.
|
||||
|
||||
** Improvement
|
||||
* [JAS-25] - Implement command aliases
|
||||
|
||||
** Task
|
||||
* [JAS-19] - create an independent configuration bean as replacement for the
|
||||
parser dependend namspace object
|
||||
* [JAS-20] - move any call of System.exit() to App.main()
|
||||
* [JAS-21] - remove obsolete option --keep
|
||||
* [JAS-26] - Use jasperreports library 5.0.4
|
||||
|
||||
|
||||
Release Notes - JasperStarter - Version 1.1.0
|
||||
----------------------------------------------
|
||||
|
||||
JasperStarter is now able to prompt for report parameters.
|
||||
|
||||
** Bug
|
||||
* [JAS-5] - Maven site does not create index.html if called directly
|
||||
* [JAS-6] - Maven site does not generate translation if called directly
|
||||
* [JAS-11] - Maven site does not create index.html if called via package
|
||||
* [JAS-16] - Selection of the report locale yields unexpected results in
|
||||
some cases
|
||||
|
||||
** Improvement
|
||||
* [JAS-13] - new parameter type locale to specify report locale independent
|
||||
from gui locale
|
||||
|
||||
** New Feature
|
||||
* [JAS-12] - new option to specify report resources like resource bundles or
|
||||
icons
|
||||
* [JAS-14] - New option: prompt for report parameters
|
||||
* [JAS-17] - New Command: List report parameters
|
||||
|
||||
** Task
|
||||
* [JAS-7] - Site translation cs
|
||||
* [JAS-22] - site translation de
|
||||
|
||||
|
||||
--------
|
||||
|
||||
1.0.1 [JAS-18] - Unable to save output into Excel format
|
||||
|
||||
1.0.0
|
||||
JasperStarter now has commands: pr - process, lp - list printers.
|
||||
New command: cp - compile, can compile one file or all .jrxml in a
|
||||
directory.
|
||||
New input file types for command pr allowed:
|
||||
jrxml - compiles implicit
|
||||
jrprint - print, view or export previously filled reports.
|
||||
New output type: jrprint. This makes --keep obsolete.
|
||||
New parameter -w writes compiled file to imput dir if jrxml is
|
||||
processed.
|
||||
Parameter -t defaults to "none" and can therefore be omited if no
|
||||
database is needed.
|
||||
Input file is read once. No temporary files needed anymore.
|
||||
Setup checks for previous versions and creates menuitems for uninstall
|
||||
and help.
|
||||
Setup is available in English, Chinese (Simplified), Czech, French,
|
||||
Hungarian, German, Polish, Romanian, Thai, Ukrainian.
|
||||
[JAS-2] - runtime parameter value cannot contain equal sign
|
||||
Contains JasperReports 5.0.1
|
||||
German translation for Site/docs
|
||||
[JAS-4] - java.lang.Integer cannot be cast to java.lang.String
|
||||
[JAS-8] - java.lang.String cannot be cast to java.lang.Integer
|
||||
[JAS-9] - Exception in thread "main" java.lang.IllegalArgumentException:
|
||||
URI has an authority component
|
||||
|
||||
0.10.0 New report parameter types: double, image (see usage).
|
||||
New supported export formats: xls, xlsx, csv, ods, pptx, xhtml, xml.
|
||||
Windows setup available.
|
||||
--version shows included JasperReports version.
|
||||
Fixed some minor bugs.
|
||||
|
||||
V 0.9.1 Bugfix release fixed problems with --jdbc-dir option.
|
||||
|
||||
V 0.9.0 First public release
|
||||
Switched from Commons CLI to argparse4j.
|
||||
Project documentation in generated site.
|
||||
README uses markdown syntay, renamed to README.md.
|
||||
Applied Apache License 2.0 to the software.
|
||||
JasperStarter now starts via executable files in ./bin.
|
||||
Windows binary jasperstarter.exe is generated with launch4j.
|
||||
|
||||
V 0.8.0 Switched to maven.
|
||||
|
||||
V 0.7.1 Fixed issue: duplicated option -n
|
||||
|
||||
V 0.7.0 new option --set-report-name to temporary change the reportname when
|
||||
printing. This is useful if you want to change the printjob name for
|
||||
printing to a pdf printer like cups-pfd which uses the document name as
|
||||
part of the pdf name by default.
|
||||
|
||||
V 0.6.0 new options --printer-name --with-print-dialog --list-printers
|
||||
printername matches .toLowercase().startWith() and spaces can be escaped
|
||||
by the underline character _.
|
||||
print dialog and viewer appear in system look an feel.
|
||||
|
||||
V 0.5.0 support for postgres, oracle and generic jdbc
|
||||
password is no longer a required option except for oracle
|
||||
jrprint file is stored in system temp dir and deleted after processing
|
||||
new options --jdbc-dir, --debug, --keep-jrprint
|
||||
file extension .jasper is added to input if omitted
|
||||
output can be omitted or can be file or directory
|
||||
|
||||
V 0.4.0 jdbc drivers are loaded from jdbc dir
|
||||
new parameter: db-type: none, mysql (none provides JREmptyDataSource()
|
||||
for a non database report)
|
||||
support for barcode4j
|
||||
|
||||
V 0.3.1 Bugfix: removed jasperreports-javaflow
|
||||
added barbecue barcode lib
|
||||
|
||||
V 0.3.0 Print preview
|
||||
nicer help message
|
||||
package renamed
|
||||
|
||||
V 0.2.0 Print support added
|
||||
Added exportformats html, odt
|
||||
Added report parameter type date.
|
||||
New parameter db-name - database name
|
||||
|
||||
V 0.1.0 First working version
|
||||
Supports export to PDF, DOCX, RTF.
|
||||
Simple report parameters of type string and int.
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
JasperStarter - Running JasperReports from command line
|
||||
Copyright 2012, 2013, 2014, 2015 Cenote GmbH
|
||||
|
||||
This product includes software developed at:
|
||||
|
||||
https://sourceforge.net/projects/jasperreports/
|
||||
https://github.com/tatsuhiro-t/argparse4j
|
||||
The Apache Software Foundation (http://www.apache.org/)
|
||||
|
||||
For a detailed view please see dependency report in the documentation.
|
||||
@@ -0,0 +1,231 @@
|
||||
|
||||
JasperStarter - Running JasperReports from command line
|
||||
--------------------------------------------------------
|
||||
|
||||
JasperStarter is an opensource command line launcher and batch compiler for
|
||||
[JasperReports][].
|
||||
|
||||
The official homepage is [jasperstater.cenote.de][].
|
||||
|
||||
It has the following features:
|
||||
|
||||
* Run any JasperReport that needs a jdbc, csv, xml, json, jsonql or empty datasource
|
||||
* Use with any database for which a jdbc driver is available
|
||||
* Run reports with subreports
|
||||
* Execute reports that need runtime parameters. Any parameter whose class has
|
||||
a string constructor is accepted. Additionally the following types are
|
||||
supported or have special handlers:
|
||||
* date, image (see usage), locale
|
||||
* Optionally prompt for report parameters
|
||||
* Print directly to system default or given printer
|
||||
* Optionally show printer dialog to choose printer
|
||||
* Optionally show printpreview
|
||||
* Export to file in the following formats:
|
||||
* pdf, rtf, xls, xlsMeta, xlsx, docx, odt, ods, pptx, csv, csvMeta, html, xhtml, xml, jrprint
|
||||
* Export multiple formats in one commanding call
|
||||
* Compile, print and export in one commanding call
|
||||
* View, print or export previously filled reports (use jrprint file as input)
|
||||
* Can compile a whole directory of .jrxml files.
|
||||
* Integrate in non Java applications (for example PHP, Python)
|
||||
* Binary executable on Windows
|
||||
* Includes JasperReports so this is the only tool you need to install
|
||||
* "Diskless" operation using stdin and stdout for input data and output.
|
||||
|
||||
Requirements:
|
||||
|
||||
* Java 1.8 or higher
|
||||
* A JDBC 2.1 driver for your database
|
||||
|
||||
|
||||
### Quickstart
|
||||
|
||||
* Download JasperStarter from [Sourceforge][].
|
||||
* Extract the distribution archive to any directory on your system.
|
||||
* Add the _./bin_ directory of your installation to your searchpath (on
|
||||
Windows: invoke setup.exe).
|
||||
* Put your jdbc drivers in the _./jdbc_ directory of your installation or
|
||||
use _\--jdbc-dir_ to point to a different directory.
|
||||
|
||||
Invoke JasperStarter with _\-h_ to get an overview:
|
||||
|
||||
$ jasperstarter -h
|
||||
|
||||
Invoke JasperStarter with _process \-h_ to get help on the process command:
|
||||
|
||||
$ jasperstarter process -h
|
||||
|
||||
Example with reportparameters:
|
||||
|
||||
$ jasperstarter pr report.jasper -t mysql -u myuser -f pdf -H myhost \
|
||||
-n mydb -o report -p secret -P CustomerNo=10 StartFrom=2012-10-01
|
||||
|
||||
Example with hsql using database type generic:
|
||||
|
||||
$ jasperstarter pr report.jasper -t generic -f pdf -o report -u sa \
|
||||
--db-driver org.hsqldb.jdbcDriver \
|
||||
--db-url jdbc:hsqldb:hsql://localhost
|
||||
|
||||
For more information take a look in the docs directory of the distibution
|
||||
archive or read the [Usage][] page online.
|
||||
|
||||
### Python Integration using public API
|
||||
|
||||
JasperStarter exposes an API which can be used with [jpy][] to
|
||||
provide direct access from Python:
|
||||
|
||||
#
|
||||
# Load the JVM. See the jpy docs for details.
|
||||
#
|
||||
import jpyutil
|
||||
jpyutil.init_jvm(jvm_maxmem='512M', jvm_classpath=['.../jasperstarter.jar'])
|
||||
#
|
||||
# Load the Java types needed.
|
||||
#
|
||||
import jpy
|
||||
Arrays = jpy.get_type('java.util.Arrays')
|
||||
File = jpy.get_type('java.io.File')
|
||||
Report = jpy.get_type('de.cenote.jasperstarter.Report')
|
||||
Config = jpy.get_type('de.cenote.jasperstarter.Config')
|
||||
DsType = jpy.get_type('de.cenote.jasperstarter.types.DsType')
|
||||
#
|
||||
# Create the JasperStarter configuration. See Config.java for details.
|
||||
#
|
||||
config = Config()
|
||||
config.setInput('jsonql.jrxml')
|
||||
config.setOutput('contacts.pdf')
|
||||
config.setDbType(DsType.json)
|
||||
config.setDataFile(File('contacts.json'))
|
||||
config.setJsonQuery('contacts.person')
|
||||
config.setOutputFormats(Arrays.asList([]))
|
||||
#
|
||||
# Run the report. See Report.java for details.
|
||||
#
|
||||
instance = Report(config, File(config.getInput()))
|
||||
instance.fill()
|
||||
instance.exportPdf()
|
||||
|
||||
See the examples/python directory for a fuller example.
|
||||
|
||||
### Release Notes
|
||||
|
||||
See [Changes] for a history of changes.
|
||||
|
||||
|
||||
#### Known Bugs
|
||||
|
||||
For upcoming issues see [Issues][]
|
||||
|
||||
|
||||
### Feedback
|
||||
|
||||
Feedback is always welcome! If you have any questions or proposals, don't
|
||||
hesitate to write to our [discussion][] forum.
|
||||
If you found a bug or you are missing a feature, log into our [Issuetracker][]
|
||||
and create a bug or feature request.
|
||||
|
||||
If you like the software you can write a [review][] :-)
|
||||
|
||||
|
||||
### Development
|
||||
|
||||
The sourcecode is available at [bitbucket.org/cenote/jasperstarter][], the
|
||||
project website is hosted at [Sourceforge][].
|
||||
|
||||
JasperStarter is build with [Maven][].
|
||||
|
||||
On Linux 64 bit the launch4j-maven-plugin may fail. In this case, may you need the following libs in a 32 bit version:
|
||||
|
||||
* z1
|
||||
* ncurses5
|
||||
* bz2-1.0
|
||||
|
||||
Install on Ubuntu 14.04 or above:
|
||||
|
||||
$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
|
||||
|
||||
Install on Fedora 27 or above:
|
||||
|
||||
$sudo dnf install ncurses-compat-libs.i686
|
||||
|
||||
To get a distribution package run:
|
||||
|
||||
$ mvn package -P release
|
||||
|
||||
or if you build from the current default branch you better use:
|
||||
|
||||
$ mvn package -P release,snapshot
|
||||
|
||||
**Attention! You cannot execute** `target/jasperstarter.jar`
|
||||
**without having it\'s dependencies in** `../lib` ! See **dev** profile below!
|
||||
|
||||
If you want to build the Windows setup.exe, you need to have _nsis_ in your
|
||||
search path (works on linux too, you can find a compiled release in the
|
||||
sourceforge download folder _build-tools_ for your convenience)
|
||||
an add the **windows-setup** profile to your build:
|
||||
|
||||
$ mvn package -P release,windows-setup
|
||||
|
||||
or
|
||||
|
||||
$ mvn package -P release,windows-setup,snapshot
|
||||
|
||||
While developing you may want to have a quicker build. The **dev** profile
|
||||
excludes some long running reports and the compressed archives. Instead it puts
|
||||
the build result into _target/jasperstarter-dev-bin_.
|
||||
|
||||
$ mvn package -P dev
|
||||
|
||||
Now you can execute JasperStarter without IDE:
|
||||
|
||||
$ target/jasperstarter-dev-bin/bin/jasperstarter
|
||||
|
||||
or
|
||||
|
||||
$ java -jar target/jasperstarter-dev-bin/lib/jasperstarter.jar
|
||||
|
||||
During development you might want not to be annoyed by tests. So the following
|
||||
options are useful:
|
||||
|
||||
$ mvn package -P dev -D skipTests
|
||||
|
||||
or
|
||||
|
||||
$ mvn package -P dev -D maven.test.failure.ignore=true
|
||||
|
||||
To run JasperStarter from within your IDE add _\--jdbc-dir jdbc_ to the argument
|
||||
list of your run configuration. Otherwise you will get an error:
|
||||
|
||||
Error, (...)/JasperStarter/target/classes/jdbc is not a directory!
|
||||
|
||||
Put your jdbc drivers in the _./jdbc_ directory of the project to invoke
|
||||
JasperStarter from within your IDE to call up a database based report.
|
||||
|
||||
|
||||
### License
|
||||
|
||||
Copyright 2012-2015 Cenote GmbH.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
[jasperstater.cenote.de]:http://jasperstarter.cenote.de/
|
||||
[JasperReports]:http://community.jaspersoft.com/project/jasperreports-library
|
||||
[Maven]:http://maven.apache.org/
|
||||
[Sourceforge]:http://sourceforge.net/projects/jasperstarter/
|
||||
[bitbucket.org/cenote/jasperstarter]:http://bitbucket.org/cenote/jasperstarter
|
||||
[review]:http://sourceforge.net/projects/jasperstarter/reviews
|
||||
[discussion]:http://sourceforge.net/p/jasperstarter/discussion/
|
||||
[Issuetracker]:https://cenote-issues.atlassian.net/browse/JAS
|
||||
[Usage]:http://jasperstarter.sourceforge.net/usage.html
|
||||
[Issues]:https://cenote-issues.atlassian.net/browse/JAS
|
||||
[Changes]:changes.html
|
||||
[jpy]:https://github.com/bcdev/jpy
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 Cenote GmbH.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
## detect home folder
|
||||
if(test -L "$0") then
|
||||
auxlink=`ls -l "$0" | sed 's/^[^>]*-> //g'`
|
||||
HOME_FOLDER=`dirname "$auxlink"`/..
|
||||
else
|
||||
HOME_FOLDER=`dirname "$0"`/..
|
||||
fi
|
||||
|
||||
#SCRIPTPATH="$(dirname $0)"
|
||||
java -jar "$HOME_FOLDER/lib/jasperstarter.jar" "$@"
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
This is the jdbc drivers directory.
|
||||
All jar files in this directory are added to the classpath.
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "geekcom/phpjasper",
|
||||
"description": "A PHP report generator",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"reports",
|
||||
"php-reports",
|
||||
"pdf"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Daniel Rodrigues Lima",
|
||||
"email": "geekcom@php.net",
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
"require": {
|
||||
"php": "^7.2|^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.4|^9.4",
|
||||
"php-coveralls/php-coveralls": "^2.2",
|
||||
"squizlabs/php_codesniffer": "*",
|
||||
"phpstan/phpstan": "^0.12.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PHPJasper\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"PHPJasper\\Test\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"phpcs": "phpcs --standard=PSR12 -n src",
|
||||
"phpstan": "phpstan analyse src --level 0",
|
||||
"phpcbf": "phpcbf --standard=PSR12 -n src",
|
||||
"unit": "phpunit --coverage-clover ./tests/log/clover.xml --colors=always",
|
||||
"testdox": "phpunit --testdox",
|
||||
"test": [
|
||||
"@phpcs",
|
||||
"@phpstan",
|
||||
"@unit"
|
||||
]
|
||||
}
|
||||
}
|
||||
+3512
File diff suppressed because it is too large
Load Diff
+8
@@ -0,0 +1,8 @@
|
||||
version: '2'
|
||||
services:
|
||||
php:
|
||||
image: geekcom/phpjasper:latest
|
||||
container_name: phpjasper
|
||||
volumes:
|
||||
- .:/var/www/app
|
||||
tty: true
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,337 @@
|
||||

|
||||
|
||||
# PHPJasper
|
||||
|
||||
_Gerador de relatórios PHP_
|
||||
|
||||
[](https://app.travis-ci.com/github/PHPJasper/phpjasper)
|
||||
[](https://coveralls.io/github/PHPJasper/phpjasper?branch=master)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://php.net/)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://packagist.org/packages/geekcom/phpjasper)
|
||||
[](https://github.com/phpstan/phpstan)
|
||||
|
||||
### Documentação
|
||||
[](https://github.com/PHPJasper/phpjasper/blob/master/README.md)
|
||||
|
||||
> ### Por favor, considere **[fazer uma doação](https://nubank.com.br/pagar/518o5/zVBzxd00Sb)**, apoie nossas atividades
|
||||
|
||||
### Sobre a biblioteca
|
||||
|
||||
PHPJasper é a solução perfeita para compilar e processar relatórios Jasper (.jrxml & .jasper) com PHP, ou seja, gerar relatórios com PHP.
|
||||
|
||||
#### Nosso canal no discord
|
||||
https://discord.gg/7FpDnQ
|
||||
|
||||
**Notas:**
|
||||
* PHPJasper pode ser usado independente de seu Framework
|
||||
* Se você está usando uma versão menor que PHP 7.0 veja: [v1.16](https://github.com/PHPJasper/phpjasper/releases/tag/v1.16)
|
||||
* [Aqui](https://github.com/PHPJasper/examples) tem vários exemplos de como usar PHPJasper
|
||||
|
||||
### Por quê preciso do PHPJasper?
|
||||
|
||||
Alguma vez você precisou de um relatório simples ou complexo em PHP para seu sistema web?
|
||||
|
||||
Eu já precisei e fui em busca de algumas soluções, a maioria delas é complexa e você precisa escrever *HTML* + *CSS* para gerar um *PDF*, isso não faz sentido, além de ser muito trabalhoso :)
|
||||
|
||||
Apresento para vocês **JasperReports** a melhor solução open source que existe para relatórios.
|
||||
|
||||
### O que eu posso fazer com isso?
|
||||
|
||||
**Texto extraido do site JasperSoft:**
|
||||
|
||||
> A biblioteca JasperReports é o mecanismo de geração de relatórios de código aberto mais popular do mundo. É inteiramente escrito em Java e é capaz de usar dados provenientes de qualquer tipo de fonte de dados e gerar documentos perfeitos que podem ser visualizado, impresso ou exportado em uma variedade de formatos de documentos, incluindo HTML, PDF, Excel, OpenOffice e Word .
|
||||
|
||||
*Exemplos do que você pode fazer:*
|
||||
|
||||
* Faturas
|
||||
* Relatórios
|
||||
* Listas
|
||||
|
||||
## Requisitos
|
||||
|
||||
* PHP 7.2 em diante
|
||||
* Java JDK 1.8
|
||||
|
||||
## Opcional
|
||||
|
||||
* Qualquer driver jdbc (MySQL, PostgreSQL, MSSQL...), para ser usado deve ser copiado para a pasta `bin/jasperstarter/jdbc`
|
||||
* Incluímos o [MySQL connector](http://dev.mysql.com/downloads/connector/j/) (v5.1.48) na pasta `bin/jasperstarter/jdbc`
|
||||
* Incluímos também o [PostgreSQL](https://jdbc.postgresql.org/) (42.2.9) na pasta `bin/jasperstarter/jdbc`
|
||||
* [Microsoft JDBC Drivers](https://www.microsoft.com/en-US/download/details.aspx?id=11774) (se você pretende usar esse tipo de banco de dados)
|
||||
* [Jaspersoft Studio](http://community.jaspersoft.com/project/jaspersoft-studio) (para escrever e compilar seus relatórios)
|
||||
|
||||
## Instalando a biblioteca PHPJasper
|
||||
|
||||
Instale o [Composer](http://getcomposer.org), e rode o comando:
|
||||
|
||||
```
|
||||
composer require geekcom/phpjasper
|
||||
```
|
||||
|
||||
Ou crie um arquivo 'composer.json' e adicione o trecho:
|
||||
|
||||
```json
|
||||
{
|
||||
"require": {
|
||||
"geekcom/phpjasper": "^3.2.0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
E execute o comando:
|
||||
|
||||
composer install
|
||||
|
||||
é isso, você tem a biblioteca instalada e pronta para uso.
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------
|
||||
## PHPJasper com Docker
|
||||
|
||||
Com o Docker CE e o docker-compose instalados basta executar os comandos:
|
||||
|
||||
* `docker-compose up -d`
|
||||
* `docker exec -it phpjasper composer install`
|
||||
|
||||
Para rodar os testes dentro do container execute:
|
||||
|
||||
* `docker exec -it phpjasper sudo composer test` ou
|
||||
* `docker exec -it phpjasper sudo composer testdox`
|
||||
|
||||
Para ver o coverage basta executar o arquivo: `tests/log/report/index.html`
|
||||
|
||||
_Ajude-nos escrevendo novos testes, faça um fork_ :)
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
## Exemplos
|
||||
|
||||
### *Hello World* PHPJasper.
|
||||
|
||||
Vá para o diretório de exemplos na raiz do repositório (`vendor/geekcom/phpjasper/examples`).
|
||||
Abra o arquivo `hello_world.jrxml` com o JasperStudio ou seu editor favorito e dê uma olhada no código.
|
||||
|
||||
#### Compilando
|
||||
|
||||
Primeiro precisamos compilar o arquivo com a extensão `.JRXML` em um arquivo binário do tipo `.JASPER`
|
||||
|
||||
**Nota 1:** Caso você não queira usar o *Jaspersoft Studio*. É possivel compilar o seu arquivo .jrxml da seguinte forma:
|
||||
|
||||
```php
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jrxml';
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
$jasper->compile($input)->execute();
|
||||
```
|
||||
|
||||
Esse comando compila o arquivo fonte `hello_world.jrxml` em um arquivo binário `hello_world.jasper`.
|
||||
|
||||
#### Processando
|
||||
|
||||
Agora vamos processar o nosso relatório que foi compilado acima:
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jasper';
|
||||
$output = __DIR__ . '/vendor/geekcom/phpjasper/examples';
|
||||
$options = [
|
||||
'format' => ['pdf', 'rtf']
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
Agora olhe a pasta **/examples** :) Ótimo trabalho? Você tem 2 arquivos, `hello_world.pdf` e `hello_world.rtf`.
|
||||
|
||||
#### Listando parâmetros
|
||||
|
||||
Como consultar o arquivo jrxml para examinar os parâmetros disponíveis no relatório:
|
||||
|
||||
```php
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world_params.jrxml';
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
$output = $jasper->listParameters($input)->execute();
|
||||
|
||||
foreach($output as $parameter_description)
|
||||
print $parameter_description . '<pre>';
|
||||
```
|
||||
|
||||
### Relatórios a partir de um banco de dados
|
||||
|
||||
Adicione os parâmetros específicos para conexão com seu banco de dados: MYSQL, POSTGRES ou MSSQL:
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'locale' => 'pt_BR',
|
||||
'params' => [],
|
||||
'db_connection' => [
|
||||
'driver' => 'postgres',
|
||||
'username' => 'DB_USERNAME',
|
||||
'password' => 'DB_PASSWORD',
|
||||
'host' => 'DB_HOST',
|
||||
'database' => 'DB_DATABASE',
|
||||
'port' => '5432'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
**Nota 2:**
|
||||
|
||||
Para a lista completa de idiomas suportados veja o link [Supported Locales](http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html)
|
||||
|
||||
### Relatórios com banco de dados MSSQL
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper or .jrxml';
|
||||
$output = '/your_output_path';
|
||||
$jdbc_dir = __DIR__ . '/vendor/geekcom/phpjasper/bin/jaspertarter/jdbc';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'locale' => 'pt_BR',
|
||||
'params' => [],
|
||||
'db_connection' => [
|
||||
'driver' => 'generic',
|
||||
'host' => '127.0.0.1',
|
||||
'port' => '1433',
|
||||
'database' => 'DataBaseName',
|
||||
'username' => 'UserName',
|
||||
'password' => 'password',
|
||||
'jdbc_driver' => 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
|
||||
'jdbc_url' => 'jdbc:sqlserver://127.0.0.1:1433;databaseName=Teste',
|
||||
'jdbc_dir' => $jdbc_dir
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
### Relatórios a partir de um arquivo XML
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
$data_file = __DIR__ . '/your_data_files_path/your_xml_file.xml';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'params' => [],
|
||||
'locale' => 'pt_BR',
|
||||
'db_connection' => [
|
||||
'driver' => 'xml',
|
||||
'data_file' => $data_file,
|
||||
'xml_xpath' => '/your_xml_xpath'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
### Relatórios a partir de um arquivo JSON
|
||||
|
||||
```php
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
use PHPJasper\PHPJasper;
|
||||
|
||||
$input = '/your_input_path/your_report.jasper';
|
||||
$output = '/your_output_path';
|
||||
|
||||
$data_file = __DIR__ . '/your_data_files_path/your_json_file.json';
|
||||
$options = [
|
||||
'format' => ['pdf'],
|
||||
'params' => [],
|
||||
'locale' => 'pt_BR',
|
||||
'db_connection' => [
|
||||
'driver' => 'json',
|
||||
'data_file' => $data_file,
|
||||
'json_query' => 'your_json_query'
|
||||
]
|
||||
];
|
||||
|
||||
$jasper = new PHPJasper;
|
||||
|
||||
$jasper->process(
|
||||
$input,
|
||||
$output,
|
||||
$options
|
||||
)->execute();
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
Depende da complexidade do seu relatório.
|
||||
|
||||
## Agradecimentos
|
||||
|
||||
[Cenote GmbH](http://www.cenote.de/) pelo [JasperStarter](https://bitbucket.org/cenote/jasperstarter/) tool.
|
||||
|
||||
[JetBrains](https://www.jetbrains.com/) pelo [PhpStorm](https://www.jetbrains.com/phpstorm/) e seu grande apoio.
|
||||
|
||||
|
||||
## [Dúvidas?](https://github.com/PHPJasper/phpjasper/issues)
|
||||
|
||||
Abra uma [Issue](https://github.com/PHPJasper/phpjasper/issues) ou procure por Issues antigas
|
||||
|
||||
|
||||
## [Licença](https://github.com/PHPJasper/phpjasper/blob/master/LICENSE)
|
||||
|
||||
MIT
|
||||
|
||||
## [Contribuição](https://github.com/PHPJasper/phpjasper/blob/master/CONTRIBUTING.md)
|
||||
|
||||
Contribua com a comunidade PHP, faça um fork !!
|
||||
@@ -0,0 +1,2 @@
|
||||
hello_world.jasper
|
||||
hello_world.pdf
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="AcuseCancelacion" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="041fd329-b27d-44e2-9712-5d45bbb4cabd">
|
||||
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="XML_Acuse_Cancelacion"/>
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<queryString language="xPath">
|
||||
<![CDATA[/CancelResponse/CancelResult/ID]]>
|
||||
</queryString>
|
||||
<field name="UUID" class="java.lang.String">
|
||||
<fieldDescription><![CDATA[UUID]]></fieldDescription>
|
||||
</field>
|
||||
<field name="StatusUUID" class="java.lang.String">
|
||||
<fieldDescription><![CDATA[StatusUUID]]></fieldDescription>
|
||||
</field>
|
||||
<field name="DateCancel" class="java.lang.String">
|
||||
<fieldDescription><![CDATA[ancestor::CancelResult/@DateCancel]]></fieldDescription>
|
||||
</field>
|
||||
<field name="VAT" class="java.lang.String">
|
||||
<fieldDescription><![CDATA[ancestor::CancelResult/@VAT]]></fieldDescription>
|
||||
</field>
|
||||
<field name="SignatureValue" class="java.lang.String">
|
||||
<fieldDescription><![CDATA[/CancelResponse/SignatureValue]]></fieldDescription>
|
||||
</field>
|
||||
<variable name="Date" class="java.util.Date" resetType="None">
|
||||
<variableExpression><![CDATA[new SimpleDateFormat("yyyy-MM-dd").parse($F{DateCancel}.substring(0,10))]]></variableExpression>
|
||||
</variable>
|
||||
<variable name="Hour" class="java.lang.String" resetType="None">
|
||||
<variableExpression><![CDATA[$F{DateCancel}.substring(11,19)]]></variableExpression>
|
||||
</variable>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<pageHeader>
|
||||
<band height="146" splitType="Immediate">
|
||||
<staticText>
|
||||
<reportElement uuid="83657516-b5eb-47a6-8e91-3a57cc671748" x="244" y="20" width="256" height="20">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="13" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Canceled Tax Documents]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="cfef981f-fffa-4c5c-8dda-a8871f00a49f" x="244" y="57" width="256" height="18"/>
|
||||
<textElement textAlignment="Center">
|
||||
<font fontName="Arial" size="11" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Cancelation Acknowledgement]]></text>
|
||||
</staticText>
|
||||
<textField pattern="d/M/yyyy">
|
||||
<reportElement uuid="5f10c6b4-2a29-45c9-990d-1582d698e7ed" x="380" y="87" width="60" height="19"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{Date}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="74d0c1e1-20e4-44c0-9530-593cb55f353a" x="440" y="87" width="60" height="19"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{Hour}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="db8ca2dd-b146-4ef4-9bcf-6e2d151dcfb2" x="380" y="125" width="100" height="19"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{VAT}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="9247eb92-e626-4540-b943-5a4009bc6a46" x="196" y="87" width="155" height="19"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Request Date and Time:]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="efe17b8e-e9f7-43dd-92ee-216937404aec" x="196" y="106" width="155" height="19"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Cancelation Date and Time:]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="388beb90-e95d-4c7f-9f08-fd8835508bb3" x="196" y="125" width="155" height="19"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[VAT number:]]></text>
|
||||
</staticText>
|
||||
<textField pattern="d/M/yyyy">
|
||||
<reportElement uuid="90e35371-99b6-4ca7-a5f7-fe211244d76d" x="380" y="105" width="60" height="19"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{Date}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="0032ffe3-aa1c-4e24-b7f2-fdfd305ff698" x="440" y="105" width="60" height="19"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{Hour}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="18" splitType="Stretch">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
<staticText>
|
||||
<reportElement uuid="133c797d-7c2f-4d9b-8ede-760dcefaf40f" x="50" y="0" width="240" height="18">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<box padding="2">
|
||||
<topPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<leftPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<bottomPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<rightPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Document ID]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement uuid="f3e39535-fd7d-4a26-afb8-41e9b7b21ab0" x="290" y="0" width="220" height="18">
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<box padding="2">
|
||||
<topPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<leftPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<bottomPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<rightPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Status]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="16" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="4f2d4226-77bc-427d-8319-d9e0d2a8d3d6" x="50" y="0" width="240" height="16">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<box padding="2">
|
||||
<topPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<leftPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<bottomPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<rightPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{UUID}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement uuid="297b8be5-a0e4-4cd5-997d-3785e4f46fe7" x="290" y="0" width="220" height="16">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<box padding="2">
|
||||
<topPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<leftPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<bottomPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
<rightPen lineWidth="0.1" lineStyle="Solid" lineColor="#B5B5B5"/>
|
||||
</box>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{StatusUUID}.equals("201") ? "Canceled" : $F{StatusUUID}.equals("202") ? "Previously Canceled" : $F{StatusUUID}.equals("203") ? "Invalid fot VAT number" : $F{StatusUUID}.equals("204") ? "Can't be canceled" : $F{StatusUUID}.equals("205") ? "ID doesn't exist" : "invalid error code"]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<pageFooter>
|
||||
<band height="46" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement uuid="ab3b86c1-5b5b-4ab2-9366-9179ba7a35a0" x="390" y="31" width="80" height="15">
|
||||
<property name="local_mesure_unitheight" value="pixel"/>
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField evaluationTime="Report">
|
||||
<reportElement uuid="07496b5d-328b-4202-a983-7adcf4813a4d" x="470" y="31" width="40" height="15">
|
||||
<property name="com.jaspersoft.studio.unit.height" value="px"/>
|
||||
</reportElement>
|
||||
<textElement textAlignment="Left"/>
|
||||
<textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement uuid="860f3e77-9004-4d2e-9d3a-639a6618fd91" x="50" y="2" width="90" height="14"/>
|
||||
<textElement>
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Digital Signature:]]></text>
|
||||
</staticText>
|
||||
<textField isStretchWithOverflow="true">
|
||||
<reportElement uuid="7ae79615-9f62-4509-960f-687837fdb7bf" x="50" y="16" width="460" height="15"/>
|
||||
<textElement>
|
||||
<font fontName="Arial"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{SignatureValue}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</pageFooter>
|
||||
</jasperReport>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CancelResponse>
|
||||
<CancelResult DateCancel="2014-11-12T09:45:47.6816495" VAT="ECI101217TZ4">
|
||||
<ID><UUID>1361E3F3-B493-4F5C-9A2D-67C7CC151907</UUID><StatusUUID>201</StatusUUID></ID>
|
||||
<ID><UUID>136F0E14-3C92-4506-991D-0DB2FB45E0A9</UUID><StatusUUID>201</StatusUUID></ID>
|
||||
<ID><UUID>13741D6D-574A-458E-8112-4943929D3DFA</UUID><StatusUUID>201</StatusUUID></ID>
|
||||
<ID><UUID>137A252B-4F8B-48CB-A5FE-219FE149CC1F</UUID><StatusUUID>201</StatusUUID></ID>
|
||||
<ID><UUID>138665F0-3935-4880-B125-3C0D03218CA8</UUID><StatusUUID>201</StatusUUID></ID>
|
||||
</CancelResult>
|
||||
<SignatureValue>cqOD3A20ku9vHI3MGI18HkSsljYcURr6fSjyk9I+MRghG9T2/EXpiqZahCSYCBr0JwFV/rCWbP6kvdk7eYGerg==</SignatureValue>
|
||||
</CancelResponse>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"contacts": {
|
||||
"person": [
|
||||
{
|
||||
"name": "ETHAN",
|
||||
"street": "Street 1",
|
||||
"city": "Fairfax",
|
||||
"phone": "+1 (415) 111-1111"
|
||||
},
|
||||
{
|
||||
"name": "CALEB",
|
||||
"street": "Street 2",
|
||||
"city": "San Francisco",
|
||||
"phone": "+1 (415) 222-2222"
|
||||
},
|
||||
{
|
||||
"name": "WILLIAM",
|
||||
"street": "Street 2",
|
||||
"city": "Paradise City",
|
||||
"phone": "+1 (415) 333-3333"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user