Topic: Annual expense breakdown report - Logo Size

Hi All

I have a problem with the logo being scaled up on the Annual expense breakdown report and Annual balance breakdown report. Can you please tell me which file i can modify to reduce the size. All other PDF reports print fine

Thanks in advance

Dave Keene

Re: Annual expense breakdown report - Logo Size

This is a custom report, written by Tom Hallman, USA.

I will try to see where you should change.

/Joe

Re: Annual expense breakdown report - Logo Size

It looks like it is in the file /reporting/includes/pdf_report.inc in member function Header3, line 444.

Look at the height and width of the logo and try to adjust.

/Joe

Re: Annual expense breakdown report - Logo Size

Joe:

Seems I'm having the same problem.  I adjusted the LOGO_HEIGHT variable (there isn't a LOGO_WIDTH variable), but that didn't change anything.

Did you mean change the actual size of the logo????

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

I am not sure, please try to experiment. I am out of office right now.

Joe

Re: Annual expense breakdown report - Logo Size

No problem, Joe.  Since this is an extension, I don't really expect you to spend a lot of time debugging it.  I just wanted to let you know that the "quick fix" you suggested didn't work.  When you get back to the office, if you have any contact info for Tom that will be helpful as I'll contact him and see if he can help.

Thanks!

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

I guess his email is in the user list. Login and search for username
tomhallman

/Joe

Re: Annual expense breakdown report - Logo Size

I just sent Tom an e-mail.  Hopefully he'll be able to help.

Thanks!

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

Thanks Chris

I also sent Tom an email yesterday so hope he same.......

Re: Annual expense breakdown report - Logo Size

Hi all. I saw Chris's email and figured I'd stop in to say hello! Honestly I haven't done FA development in a while now... could you point me to where I could find the code for that extension?  I tried looking all over the website but couldn't find it.  If I could take a look at it I may be able to figure it out.

Tom

Re: Annual expense breakdown report - Logo Size

I am afraid that the header part of this extension has been incorporated into FrontAccounting Core. I will put the file pdf_report.inc for download. It is about line 444 in the file function Header3().

I guess that this about the logo is a bit longer down in the function Header3().

If you find and can explain where to change the AddImage parameters, then please Tom otherwise I will have to help the guys.

/Joe

Post's attachments

pdf_report.inc 35.5 kb, 2 downloads since 2013-02-08 

You don't have the permssions to download the attachments of this post.

Re: Annual expense breakdown report - Logo Size

Ahhh now I understand.  Full disclosure: I actually didn't write that code - a coworker of mine was the mastermind behind the reporting code changes (over 3 years ago!)  Our copy of FA is still pretty old though, so we don't have a good development environment set up right now.  I'm afraid I won't be able to help with this one... sorry sad

In other news, we're still regularly using FA and even incorporated some auto-importing code recently so that there's seamless integration between some of our systems.  We do intend to get caught up with the latest version of FA, but I can't give a time estimate at the moment.

Re: Annual expense breakdown report - Logo Size

Hello Tom, nice to hear from you. Not a problem, I will see if I can help the guys.

@David Keen and @chrison.

I will test this in the weekend. As soon as I have something, I will be back here.

/Joe

Re: Annual expense breakdown report - Logo Size

@Tom:

Ahhh!  I didn't realize that it's been that long since you worked with the code  Sorry to bother you with it, then.

@Joe:

No problem, Joe.  It's not a major issue (at least with me), so whenever you have time to take a look that will be fine.

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

Hello again.

You can experiment with this line 454 in /reporting/includes/pdf_report.inc.

define('COMPANY_WIDTH', 150);

Setting a greater value than 150 will increase the logo. A smaller value will decrease the logo.

Happy testing! smile

/Joe

Re: Annual expense breakdown report - Logo Size

Hi, Joe!

Setting COMPANY_WIDTH to anything greater than "40" makes my logo large enough to get in the way of the report header, so leaving it at that value has fixed the problem.

One thing I noticed, though...  I think the problem isn't so much that the logo is too big (although that's a factor) but that it's printing too low on the report.  I've noticed on other reports that the logo prints at the very top of the page, but for this report it's printing more down by the header.

I really wish I knew more about PHP so I could fiddle with this stuff myself!  (SIGH!)   But, maybe if somehow the logo could be moved up just a bit that would help?

No big deal!  Don't waste time on it if there's other more important things to work on.  Just thought I'd mention it.

Thanks, again, for all your help!

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

You can experiment with the y-axes on line 531 in /reporting/includes/pdf_report.inc.

$this->AddImage($logo, $companyCol, $this->row, COMPANY_WIDTH, 0);

You can try setting the third parameter, $this->row to be $this->row - 10 to get the y-axes down 10 pixels, + 10 to get it up 10 pixels.

/Joe

Re: Annual expense breakdown report - Logo Size

Setting "$this->row + 15" helps.

Thanks!

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

I think we can change that in the core. Will do that asap.

Joe

20 (edited by chrison 02/10/2013 08:20:13 pm)

Re: Annual expense breakdown report - Logo Size

I'm just wondering if those changes will adversely effect other reports?  I haven't tried other reports (yet) to see if the logo is changed for them, but will do so in the next few days.

Just wondering...

Regards,

Chris

Re: Annual expense breakdown report - Logo Size

No, I guess there are no custom reports using header3 at the moment. So we can easily change this.

This has already been done. HG Repository updated.

/Joe

Re: Annual expense breakdown report - Logo Size

Okay, thanks!

Chris