File tree Expand file tree Collapse file tree 1 file changed +16
-23
lines changed Expand file tree Collapse file tree 1 file changed +16
-23
lines changed Original file line number Diff line number Diff line change @@ -184,35 +184,28 @@ require __DIR__ . '/vendor/autoload.php';
184184
185185use JasperPHP\JasperPHP;
186186
187- $input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jrxml';
188- $output = __DIR__ . '/vendor/geekcom/phpjasper/examples';
189-
190- private $conn;
191-
192- public function __construct()
193- {
194- $this->conn = [
195- 'driver' => 'postgres',
196- 'username' => 'DB_USERNAME',
197- 'password' => 'DB_PASSWORD',
198- 'host' => 'DB_HOST',
199- 'database' => 'DB_DATABASE',
200- 'schema' => 'DB_SCHEMA',
201- 'port' => '5432'
202- ];
203- }
187+ $input = '/your_input_path/your_report.jasper';
188+ $output = '/your_output_path';
189+ $format = 'pdf';
190+ $locale = 'en';
204191
205192$jasper = new JasperPHP;
206193
207194$jasper->process(
208195 $input,
209196 $output,
210- array("pdf", "rtf"),
211- array("php_version" => phpversion()),
212- $this->conn,
213- true,
214- true,
215- 'pt_BR' //LOCALE *note 2
197+ $format,
198+ [],
199+ [
200+ 'driver' => 'postgres',
201+ 'username' => 'DB_USERNAME',
202+ 'password' => 'DB_PASSWORD',
203+ 'host' => 'DB_HOST',
204+ 'database' => 'DB_DATABASE',
205+ 'schema' => 'DB_SCHEMA',
206+ 'port' => '5432'
207+ ],
208+ $locale
216209)->execute();
217210```
218211
You can’t perform that action at this time.
0 commit comments