Topic: report generation issue

Hi,

I am trying to create a new report on my module “shipment” I just go through the functionality as Tracmor has used for “Asset Transaction Report”. I am getting no. of records and data from my db table but at last, when I GENERATE the report there occur an error as:

Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\tracmor\includes\php\PHPReports\php\PHPReportCol.php(309) : eval()'d code on line 1

if I commit out return eval($sExpr_); [ie ////return eval($sExpr_);] then got three line [without db records] Note that my query fetch 2 rows:

Shipment Report
Shipment Field One:     Shipment Field Two:     Shipment Field Three:     Shipment Field Four:
Shipment Field One:     Shipment Field Two:     Shipment Field Three:     Shipment Field Four:
Shipment Field One:     Shipment Field Two:     Shipment Field Three:     Shipment Field Four:

I expect that error is here: [but could not able to fixed it]

$oGroups = “
           <GROUP NAME='shipment_id' EXPRESSION='shipment_id' PAGEBREAK='FALSE'>
             <HEADER>
               <ROW>
                 <COL ALIGN='LEFT' TYPE='EXPRESSION' COLSPAN='”.(4 + $intCustomFieldCount).”' CELLCLASS='report_section_heading'>\$this->getValue('shipment__transaction_id__shipping_account_id__short_description').' by '.(\$this->getValue('shipment__transaction_id__modified_by')?\$this->getValue('shipment__transaction_id__modified_by').' by '.(\$this->getValue('shipment__transaction_id__modified_by')?\$this->getValue('shipment__transaction_id__modified_by').' '.\$this->getValue('shipment__transaction_id__modified_by').' on '.\$this->getValue('shipment__transaction_id__modified_date'):\$this->getValue('shipment__transaction_id__created_by__modified_by').' '.\$this->getValue('shipment__transaction_id__created_by').' on '.\$this->getValue('shipment__transaction_id__creation_date'))</COL>
               </ROW>
               <ROW>
                 <COL CELLCLASS='report_column_header'>Shipment Field One:</COL>
                 <COL CELLCLASS='report_column_header'>Shipment Field Two:</COL>
                 <COL CELLCLASS='report_column_header'>Shipment Field Three:</COL>
                 <COL CELLCLASS='report_column_header'>Shipment Field Four:</COL>
                 $strXmlColNameByCustomField
               </ROW>
             </HEADER>
             <FIELDS>
             
             </FIELDS>
           </GROUP>”;

Please, somebody help to fix the problem...!
Thanks in advance
Neo

Thanks
Neo

Re: report generation issue

Please refrain from posting the exact same post in different parts of the forums. I am deleting the duplicate post.

Justin Sinclair

Got Inventory? Get Tracmor.

Re: report generation issue

jsinclair wrote:

Please refrain from posting the exact same post in different parts of the forums. I am deleting the duplicate post.

.....
ya sure

Last edited by neomaster (2011-02-11 01:27:18)

Thanks
Neo

Re: report generation issue

Hi,

I am using qcodo/tracmor. I tried to implement the same report generating feature as “ASSET TRANSACTION REPORT” in tracmor. I mostly copy and past the code and make the changes as per needed. Finally I could able to generate report for my module “SHIPMENT”. But I got the report for single field only ie I can generate a report of single filed of db table only.  Actually, I replace exiting code (From ASSET TRANSACTION REPORT) to my module “SHIPMENT REPORT” ;as shown below:

//*****************  Original code (For:ASSET TRANSACTION REPORT )****************$oGroups = “
           <GROUP NAME='transaction_id' EXPRESSION='transaction_id' PAGEBREAK='FALSE'>
             <HEADER>
               <ROW>
                 <COL ALIGN='LEFT' TYPE='EXPRESSION' COLSPAN='”.(4 + $intCustomFieldCount).”' CELLCLASS='report_section_heading'>\$this->getValue('asset_transaction__transaction_id__transaction_type_id__short_description').' by '.(\$this->getValue('asset_transaction__transaction_id__modified_by')?\$this->getValue('asset_transaction__transaction_id__modified_by__first_name').' '.\$this->getValue('asset_transaction__transaction_id__modified_by__last_name').' on '.\$this->getValue('asset_transaction__transaction_id__modified_date'):\$this->getValue('asset_transaction__transaction_id__created_by__first_name').' '.\$this->getValue('asset_transaction__transaction_id__created_by__last_name').' on '.\$this->getValue('asset_transaction__transaction_id__creation_date'))</COL>
               </ROW>
               <ROW>
                 <COL CELLCLASS='report_column_header'>Asset Code:</COL>
                 <COL CELLCLASS='report_column_header'>Asset Model:</COL>
                 <COL CELLCLASS='report_column_header'>From:</COL>
                 <COL CELLCLASS='report_column_header'>To:</COL>
                 $strXmlColNameByCustomField
               </ROW>
             </HEADER>
             <FIELDS>
               <ROW>
                 <COL TYPE='FIELD' CELLCLASS='report_cell'><LINK TYPE='EXPRESSION'>'”. _SUBDIRECTORY_ .”/assets/asset_edit.php?intAssetId='.\$this->getValue('asset_transaction__asset_id__asset_id')</LINK>asset_transaction__asset_id__asset_code</COL>
                 <COL TYPE='FIELD' CELLCLASS='report_cell'><LINK TYPE='EXPRESSION'>'”. _SUBDIRECTORY_ .”/assets/asset_model_edit.php?intAssetModelId='.\$this->getValue('asset_transaction__asset_id__asset_model_id__asset_model_id')</LINK>asset_transaction__asset_id__asset_model_id__short_description</COL>
                 <COL TYPE='FIELD' CELLCLASS='report_cell'>asset_transaction__source_location_id__short_description</COL>
                 <COL TYPE='FIELD' CELLCLASS='report_cell'>asset_transaction__destination_location_id__short_description</COL>
                 $strXmlFieldByCustomField
               </ROW>
             </FIELDS>
           </GROUP>”;

//************************* My Code **************************

$oGroups = “
           <GROUP NAME='shipment_id' EXPRESSION='shipment_id' PAGEBREAK='FALSE'>
             <HEADER>
               <ROW>
                 <COL CELLCLASS='report_column_header'>Shipment Number </COL>
                 $strXmlColNameByCustomField
               </ROW>
               
             </HEADER>
             <FIELDS>
              <ROW>
                 <COL ALIGN='LEFT' TYPE='EXPRESSION' COLSPAN='”.(4 + $intCustomFieldCount).”' CELLCLASS='report_section_heading'>\$this->getValue('shipment_number')</COL>
               </ROW>
             </FIELDS>
           </GROUP>”;

//*** Note:  table name:   shipment
            table field:  shipment_number, Shipment Date, Created By ...etc

I am able to generate report either on shipment_number or Shipment Date..etc but not for both fields?

??
I make many changes but not sure what is mistake?

Plz reply sombody

Thanks in advance
Neo

Thanks
Neo