yiijasper Yii libraries to use Jasper Server Reports

  1. Installation:
  2. Requirements
  3. Usage
  4. Resources
  5. Demo

YiiJasper

Yii libraries to use Jasper Server Reports

This extension provides access to show Jasper Reports in Yii from Jasper Server.

Note: This IS NOT a .jrxml parser version, you must install Jasper Server

Installation:

Copy YiiJasper folder to yii extensions folder.

You can import the extension where you use this or in the config main adding

'import'=>array(
		//...
		'ext.YiiJasper.*',
	),

Then you need configure some parameters in JasperReport.php to communicate with your Jasper Server:

/* Jasper server URL (Default Value) */
	protected $baseUrl = 'http://localhost:8080/jasperserver/';

	/* Jasper server username (Default Value) */
	protected $jusername = 'jasperadmin';

	/* Jasper server password (Default Value) */
	protected $jpassword = 'jasperadmin';

Requirements

  • Yii Version 1.1.14

  • Installed and working Jasper Server (Tested in Community v5.2.0)

Usage

Examples for basic usage

/* Html Report */
	$pages = '1-4';
	$re = new JasperReport('/reports/samples/AllAccounts');
  	$re->exec();
  	echo $re->toHTML($pages); //Page 1 to 4

	/* Pdf Report */
	$re = new JasperReport('/reports/samples/AllAccounts');
  	$re->exec();
  	echo $re->toPDF(); //All pages

	/* Xls Report */
	$re = new JasperReport('/reports/samples/AllAccounts');
   	$re->exec();
   	echo $re->toXLS(8); //Page 8

   	/* Widget Report, Html report with pagination */
   	$this->widget('JReportView', array(
		'pathReport'=>'/reports/samples/AllAccounts',
	));
 

Resources

GitHub repository - https://github.com/cezario/yiijasper

Demo

  • Demo file is included in download file, but I recommend download from GitHub
7 0
11 followers
874 downloads
Yii Version: Unknown
License: GPL-2.0
Category: Others
Developed by: cezario
Created on: Oct 16, 2013
Last updated: 5 years ago

Downloads

show all

Related Extensions