Hello friends :)
I would like to get a help once again..
I need to make reports in php with Codeigniter then be able to print it..
Like list of people who are hasnt yet settle payment
I know..its just a query...but how to turn that a report and give the user the option to print it..
Any guide please..

Recommended Answers

I need to make reports in php with Codeigniter then be able to print it..\

How the reports generated? Is it PDF or other files?

Here a link to generated PDF

http://www.christophermonnat.com/2008/08/generating-pdf-files-using-codeigniter/

You need to used this to print:

window.print();

Jump to Post

Your responsibility is to format the data read from the database, using PHP and HTML, into something that looks useful and appealing to the user. You can use tables, lists and other HTML elements and CSS. Regarding CSS you can use media rules: @screen for onscreen display in …

Jump to Post

Can you explain more, please?

Jump to Post

what about printing some kind of receipt ..where there would be thinng written, i just need to cater for the "name" from the database :S

Like what bro1 mention explain a little more what receipt?

I think you might be confused with a Cash Register?

I mean if …

Jump to Post

All 13 Replies

Your responsibility is to format the data read from the database, using PHP and HTML, into something that looks useful and appealing to the user. You can use tables, lists and other HTML elements and CSS. Regarding CSS you can use media rules: @screen for onscreen display in the browser and print for printing. You can also dive into CSS3 media queries for more.

And of course as LastMitch suggested, you can use PDF which will give you much more formating freedom.

Hye , guys thanks so much :D. .
what about printing some kind of receipt ..where there would be thinng written, i just need to cater for the "name" from the database :S

Can you explain more, please?

Member Avatar

what about printing some kind of receipt ..where there would be thinng written, i just need to cater for the "name" from the database :S

Like what bro1 mention explain a little more what receipt?

I think you might be confused with a Cash Register?

I mean if you are going to print something out from the website (Codeigniter Framework) then I think the CSS would be a best option because you can design and measure the size of the receipt (paper) and it will print it out.

If you were to convert it to PDF then that will be bit too much work on just for a receipt.

i want like a receipt...hmm aafter payment , we usually get receipt..that wat am talking about :/...in that receipt...the name of customer wud be taken from the db ...

Again, you have to design the receipt using HTML + CSS. Also you have to build the logic to read the correct name from the db.

Member Avatar

i want like a receipt...hmm aafter payment , we usually get receipt..that wat am talking about :/...in that receipt...the name of customer wud be taken from the db ...

Did you read what broj1 mention used HTML + CSS to do that. He even provide a link for to do that too.

Theres no link :(

See media rules @screen and @print (my first post).

oki, thanks

Hopefuly this resolves your issue. If yes, please mark as solved. If no, come back with more questions. Happy coding.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.