Ireport Extension

Hi All,

Can someone guide me on how to use ireport extension. I have downloaded ireport extension. When I try to access it , I get the below warning.

Thanks & Regards,

Vidhya

please check the usage area given on extension page.

Usage

Yii::import(‘application.ext.extensions.ireport.*’);

$AReport = new IReport(‘sample2.jrxml’);

$AReport->parameters = array("parameter1"=>1);

$AReport->execute();

create ‘extensions’ folder where you mvc folder are located like model view controller and extract this extension in that folder.

you can import like given above as well or you can simply define this in config/main.php file

‘import’=>array(

    'application.models.*',


    'application.components.*',


    'application.ext.extensions.ireport.*


),

I dont know the extension but be careful with:




  Yii::import('application.ext.extensions.ireport.*'); //there is a small error 






Yii::import('application.extensions.ireport.*');  //method 1

Yii::import('ext.ireport.*');  //method 2



use method 1 or method 2, both are the same.

Hi,

Thank you both for your reply.

I have tried as you both have mentioned. But I get the below error:

Kindly assist me.

Thanks & Regards,

Vidhya

Hi,

The above error/warning was I dint have the tcpdf. So got it resolved by including it.

Now am getting the below error:

Can someone let me know as to why am getting this error?

Thanks & Regards,

Vidhya

hi Vidhya,

please check for positionType variable in the file.

regards

Hi Anil ,

Thank you for your reply.

I checked the IReportParser.php file which contains the "positionType".

When I place them in quotes i dont receive that error but leads to undefined index "gname".

So each time a new undefined index appears. Can you help me to understand how it works to get it resolved?

Thanks & Regards,

Vidhya

hi Vidhya,

Yii follow its standard so if you will choose any inappropriate method to do the right thing in wrong way then these kind of errors will occurs.

as like include_once(C:\xampp\htdocs\WebAdminPortal\protected\extensions\ireport/tcpdf/tcpdf.php):

so i will suggest you to firstly follow proper method then this will surely work without any errors. please try to follow yii method to integrate this extension.

regards

Hi Anil,

I have followed the yii way to use the extension. Steps followed:

  1. downloaded ireport and tcpdf to the extensions folder.

  2. Imported the extension using


Yii::import('application.extensions.ireport.*');


$AReport = new IReport('sample2.jrxml');


$AReport->parameters = array("parameter1"=>1);


$AReport->execute();



Kindly let me know if am missing something?

Thanks & Regards,

Vidhya

please check the extension one more time if this extension work fine or not. might be issue with extension.

what is the current issue?

Class file path issues fixed?

Hi Rajith,

Yes, file path issues are solved. I am getting undefined index exceptions.

Thanks & Regards,

Vidhya