Click here to Skip to main content
15,915,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am automating a Invoice & this is my project.
i have completed creating user interface and updating that to database.
Now i have to print that in a format.
could you please suggest me how to go about?

Thanks
Lancy
Posted

Generate some invoice and let the user print it; that would be the best solution; the user can just save this page to print later (or never — one of the goals of new developments in computer industry was paperless business, so why on Earth printing should be enforced).

The problem though is: many Web pages these days are overly complicated and not suitable for printing. Just recently the most popular solution was a link "printable version"; this approach is still used pretty often. I think this is ugly and nearly obsolete approach. It apparently creates many problems of support.

There is much more modern and elegant approach: using CSS Media Types. The idea is to provide CSS style sheet which can define different styles for different media types, usually "@media print" and "@media screen". One can also have common styles for both screen and printed presentations, "@media screen, print". CSS can include special media rules using the syntax shown here:
http://www.w3schools.com/css/css_mediatypes.asp[^].

This is the chapter of the Standard with detailed description:
http://www.w3.org/TR/CSS2/media.html[^].

—SA
 
Share this answer
 
v2
Comments
Lancy.net 10-Nov-11 0:48am    
thanks
Sergey Alexandrovich Kryukov 13-Jun-13 2:08am    
You are very welcome. Was almost two years enough for you to accept this answer formally (green button)? :-)
—SA
_Amy 13-Jun-13 2:14am    
My +5! Finally got it, huh?
Sergey Alexandrovich Kryukov 13-Jun-13 2:24am    
:-)
Hi Mary,

You can use crystal report which will not only useful for printing but also you can export the report to a desired format(pdf,excel....).

Hope this helps
 
Share this answer
 
Comments
Lancy.net 10-Nov-11 0:50am    
thanks sriman my invoice consist of tables, textboxes, lines..
can i go ahead with crystal report?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900