Skip to content

Commit 537cd8e

Browse files
author
Daniel Rodrigues Lima
committed
general improvements and updated documentation
1 parent aa69375 commit 537cd8e

File tree

5 files changed

+38
-37
lines changed

5 files changed

+38
-37
lines changed

README.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ I recommend using [Jaspersoft Studio](http://community.jaspersoft.com/project/ja
3434
* Reports
3535
* Listings
3636

37-
Package to generate reports with [JasperReports 6](http://community.jaspersoft.com/project/jasperreports-library) library through [JasperStarter v3](http://jasperstarter.sourceforge.net/) command-line tool.
37+
Package to generate reports with [JasperReports 6.3.0](http://community.jaspersoft.com/project/jaspersoft-studio/releases) library through [JasperStarter v3](http://jasperstarter.sourceforge.net/) command-line tool.
3838

3939
##Requirements
4040

@@ -52,18 +52,20 @@ Check if you already have Java installed:
5252

5353
```
5454
$ java -version
55-
java version "1.8.0_65"
56-
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
57-
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode, sharing)
55+
java version "1.8.0_101"
56+
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
57+
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
5858
```
5959

6060
If you get:
6161

62-
command not found: java
62+
command not found: java
6363

6464
Then install it with: (Ubuntu/Debian)
6565

66-
$ sudo apt-get install default-jdk
66+
$ sudo apt-get install default-jdk
67+
68+
To install on windows visit the link-> [JDK](http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html) and look for the most appropriate version for your system.
6769

6870
Now run the `java -version` again and check if the output is ok.
6971

@@ -78,14 +80,14 @@ Or in your 'composer.json' file add:
7880
```javascript
7981
{
8082
"require": {
81-
"lavela/phpjasper": "1.*"
83+
"lavela/phpjasper": "1.*"
8284
}
8385
}
8486
```
8587

8688
And the just run:
8789

88-
composer install
90+
composer install
8991

9092
and thats it.
9193

@@ -94,7 +96,7 @@ and thats it.
9496
###The *Hello World* example.
9597

9698
Go to the examples directory in the root of the repository (`vendor/lavela/phpjasper/examples`).
97-
Open the `hello_world.jrxml` file with iReport or with your favorite text editor and take a look at the source code.
99+
Open the `hello_world.jrxml` file with Jaspersoft Studio or with your favorite text editor and take a look at the source code.
98100

99101
#### Compiling
100102

@@ -108,7 +110,7 @@ require __DIR__ . '/vendor/autoload.php';
108110

109111
use JasperPHP\JasperPHP;
110112

111-
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jrxml';
113+
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jrxml';
112114

113115
$jasper = new JasperPHP;
114116
$jasper->compile($input)->execute();
@@ -126,15 +128,15 @@ require __DIR__ . '/vendor/autoload.php';
126128

127129
use JasperPHP\JasperPHP;
128130

129-
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jasper';
130-
$output = __DIR__;
131+
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jasper';
132+
$output = __DIR__ . '/vendor/lavela/phpjasper/examples';
131133

132134
$jasper = new JasperPHP;
133135

134136
$jasper->process(
135-
$input,
136-
$output,
137-
array("pdf", "rtf")
137+
$input,
138+
$output,
139+
array("pdf", "rtf")
138140
)->execute();
139141
```
140142

@@ -169,24 +171,24 @@ We can also specify parameters for connecting to database:
169171

170172
require __DIR__ . '/vendor/autoload.php';
171173

172-
use JasperPHP\JasperPHP;
174+
use JasperPHP\JasperPHP;
173175

174-
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jrxml';
175-
$output = __DIR__;
176+
$input = __DIR__ . '/vendor/lavela/phpjasper/examples/hello_world.jrxml';
177+
$output = __DIR__ . '/vendor/lavela/phpjasper/examples';
176178

177179
$jasper = new JasperPHP;
178180
$jasper->process(
179-
$input,
180-
$output,
181-
array("pdf", "rtf"),
182-
array("php_version" => phpversion()),
183-
array(
184-
'driver' => 'postgres',
185-
'username' => 'vagrant',
186-
'host' => 'localhost',
187-
'database' => 'samples',
188-
'port' => '5432',
189-
)
181+
$input,
182+
$output,
183+
array("pdf", "rtf"),
184+
array("php_version" => phpversion()),
185+
array(
186+
'driver' => 'postgres',
187+
'username' => 'vagrant',
188+
'host' => 'localhost',
189+
'database' => 'samples',
190+
'port' => '5432',
191+
)
190192
)->execute();
191193
```
192194

@@ -201,17 +203,17 @@ Or in your 'composer.json' file add:
201203
```javascript
202204
{
203205
"require": {
204-
"lavela/phpjasper": "1.*"
206+
"lavela/phpjasper": "1.*"
205207
}
206208
}
207209
```
208210
2. And the just run:
209211

210-
**composer update**
212+
**composer update**
211213

212214
3. Add to your config/app.php providers array:
213215

214-
**JasperPHP\JasperPHPServiceProvider::class,**
216+
**JasperPHP\JasperPHPServiceProvider::class,**
215217

216218
4. Create a folder **/report** on **/public directory**
217219

@@ -229,11 +231,11 @@ Or in your 'composer.json' file add:
229231
use JasperPHP\JasperPHP;
230232

231233
Route::get('/reports', function () {
232-
234+
233235
$output = public_path() . '/report/'.time().'_hello_world';
234236
$report = new JasperPHP;
235237
$report->process(
236-
public_path() . '/report/hello_world.jrxml',
238+
public_path() . '/report/hello_world.jrxml',
237239
$output,
238240
array('pdf', 'rtf', 'xml'),
239241
array(),
@@ -297,7 +299,7 @@ to folder:
297299

298300
###MySQL
299301

300-
We ship the [MySQL connector](http://dev.mysql.com/downloads/connector/j/) (v5.1.34) in the `/src/JasperStarter/jdbc/` directory.
302+
We ship the [MySQL connector](http://dev.mysql.com/downloads/connector/j/) (v5.1.39) in the `/src/JasperStarter/jdbc/` directory.
301303

302304
###PostgreSQL
303305

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"reports",
77
"jasper",
88
"jasperreports",
9-
"reports",
109
"pdf",
1110
"xml",
1211
"PHP",

src/JasperPHP/JasperPHP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function __construct($resource_dir = false)
2020
$this->windows = true;
2121

2222
if (!$resource_dir) {
23-
$this->resource_directory = __DIR__ . '/../../../vendor/cossou/jasperphp/src/JasperStarter/bin';
23+
$this->resource_directory = __DIR__ . '/../../../vendor/lavela/phpjasper/src/JasperStarter/bin';
2424
} else {
2525
if (!file_exists($resource_dir))
2626
throw new \Exception('Invalid resource directory.', 1);
-938 KB
Binary file not shown.
966 KB
Binary file not shown.

0 commit comments

Comments
 (0)