Help - Search - Members - Calendar
Full Version: Reports?
Invision Power Services > Community Forums > Community Web Design and Coding
Brandon D
I need to create reports (they're "fake" paychecks) using PHP. One paycheck per page (although sometimes the paycheck can exceed a page), and generally around 500 paychecks per report.

Any ideas? The paycheck includes images and needs to be able to be styled with CSS.

Maybe PDFs is the way to go?

Mucho thanks.
Brandon D
Hell, if I can simply print it out to the browser page and have it print fine (e.g. each paycheck on a new page), then that works too.
Brendon Koz
Is there a question/request in there? It looks more like a statement.

What exactly are you having difficulty with? Have you attempted this? Where is the information coming from? Can you do it in Access or perhaps FileMaker - or better yet, some sort of payroll application?
Brandon D
Just looking for any kind of advice. I'm not sure where to go with this. I'm currently playing around with creating PDFs but it's not turning out as good as I'd like.

The information is coming from a MySQL database. I may end up doing it through a report in Access, but I was really hoping to keep it all on the website.
Brendon Koz
QUOTE (Retaliation.SG @ Jul 8 2008, 12:23 PM) *
Just looking for any kind of advice. I'm not sure where to go with this.

Depending on your requirements, it would make a difference whether this should be on the website or not. As it's payroll, if this is for a business, unless you have some nice access control implemented, I don't think you'd want to have it available on the web.

Then again, you say they're "fake" paychecks. I have a feeling that there might be a better term to explain what they truly are, as there really isn't much use for a fake paycheck, especially 500 of them.

To me, it sounds like you don't really know where you're going with this (i.e.: you have a task, but you're not clear what the task itself is), and unfortunately I don't think it's something that we can tell you or direct you to (unless someone has already done this, and can give you an example of what they have done - but I doubt that's the case). I think you'll need to discuss it more in-depth with your stakeholders to see exactly what it is that he/she/they want out of this.

There are plenty of ways it can be done, and undoubtedly plenty of visual mockups that could be made from the data you have available to you. With that being said, goodluck. wink.gif
Brandon D
Thanks for the input.

I'm on contract with a school where they have an economic system in place. Students get paid a certain amount for each class they attend and are required to pay fines (write checks) for infractions like failure to do assigned work, dress code violations, failure to follow instructions, and more. Students (there are actually 1000+ of them) are paid on a monthly basis, with standard deductions in place like social security and income tax. Additional deductions and bonuses may be applied, like a charge for attending a field trip or a bonus for receiving all top marks on their report card. It's all fake money.

I already have in place on the website (PHP+MySQL) where checks can be entered, bonuses and deductions can be applied, and the ability to perform the payroll. The website parses an attendance count file pulled from county software, determines the gross pay accordingly, and then deducts any checks the student may have written as well as any other additional deductions. Bonuses are applied and the value is added to the student's previous pay period balance and stored in the database with a history of the year to date information.

This is where I get stuck. I have to make paychecks now. There's three main parts to each student's paycheck:

a) The actual paycheck
b) The statement detailing days worked, total bonuses and total deductions etc
c) A check detail section which lists information on each check the student wrote during the pay period

Part A includes images. All three parts include data pulled from the database. The ideal paycheck exists on a single page, although someone with a ton of checks may spill over to another.

I'm currently playing in Access, I have the appropriate MySQL tables linked and am playing with the reports. I've had little experience with Access reports, but I think it might work. Access doesn't need to perform any calculations, it just needs to insert data into the report. It may get hairy when I have to loop through the records returned containing all the checks written, but I don't think it'll be too hard. If anyone has any pointers with this, or any resources that you can link me, that would be great. In the meantime I'll just continue to toy around with it and abuse Google.


I apologize for not going into this much detail before, I didn't think people would need it.
Brendon Koz
Wow. That is one awesome idea and I'm glad to see it being implemented. You have a really, really, really cool thing going on there! Good luck with that! biggrin.gif I do still go back to my original statement though. If you spoke with the administration and created a few mockups of what the checks could look like and/or ask if they can create a rough template of what they'd want it to look like - it might make things a little smoother for you.

Hopefully Access will do just fine. I think some people got Crystal Reports working with PHP (though that might be overkill). I suppose it also depends on how these checks are to be delivered, will it be processed by a single person, by their first classroom attendant (teacher?) in the morning, etc... If not being printed in mass quantities, a web-based version might not be all that bad (assuming you can't get Access to work).
Brandon D
1 Access Database (3 queries, 1 report, 2 sub-reports), 8 MySQL tables, 25 skin templates, 3,948 lines of PHP and lots of swearing later, all of the economy system thingy is done and tested. I'm actually rather proud of it. It's one solid beast, and perhaps one of the most useful applications I've ever written. Having said that, I don't want to see it ever again. Ever.
Brendon Koz
LOL! Congratulations. Any chance we can see some mockups of the application and output just so you can show it off before you decide to never see it again? original.gif
Brandon D
An example paycheck (student named crossed out for obvious reasons):
Click to view attachment

The access database:
Click to view attachment

Some random shots of the web interface (you'll have to excuse the page alignment (you can see a white pixel line along the left of the content), as that was a CSS bug that I fixed a while back but apparently it's back for more fun):
Click to view attachmentClick to view attachment
Click to view attachment
Brendon Koz
That is absolutely awesome. Congratulations on this! As far as a bug, the only thing I noticed was on the last screen, clearing all "bonues". original.gif

I'd love it if all schools implemented something similar to this. I love the idea.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.