1 (edited by evilive 08/09/2011 02:12:27 pm)

Topic: Custom Header function

My Situation :
I've created an extension called hr and it's working just fine. Have no problem hooking it up.

../modules/hr/

Then, I've created a reporting directory and created "reports_custom.php" file. I put all of my newly created reports in this directory.

../modules/hr/reporting/
../modules/hr/reporting/reports_custom.php
../modules/hr/reporting/rep801.php    (to rep806.php)

All of my reports have the following line :

$rep = new FrontReport('SALARY SLIP', "SalarySlip", user_pagesize());
$rep->SetHeaderType('Header4');

As you might figured out, I'm using/calling my own header function called "Header4" and I place this function in FrontReport class(in pdf_report.inc file).

/reporting/includes/pdf_report.inc

So, what am I trying to achieve here :
1. I don't want to touch/add/alter anything in any files/script that belong to FrontAccounting files.
2. I want to take off the "Header4" function and put it in my extension's reporting directory. The problem is I'm lost on how to hook it up with FrontReport class. Is it possible?
3. There're functions to hook an extension; functions to hook customs report but couldn't find any function to hook custom report "Header". Do enlight me.

Re: Custom Header function

Sorry, I've figured it out and it's quite simple. Wasn't thinking of it much when I post it yesterday. No wonder no one reply. big_smile