Invoice printing in ASP.NET

G

Guest

Hello,
I am new to ASP.NET and I have to print an invoice from an application
written in ASP.NET, I have followed most of the threads in this newsgroup
about the dificulties posed by the server side nature of ASP.NET, but nobody
really addressed a solution to the problem, can I use "Crystal Reports" which
comes with Visual Studio to do it ? What is the down side if any ?. I'm
asking instead of just doing it because since I don't know Crystal I'm trying
to avoid having to learn something that is NOT going to help me.

Thanks

C.Fleury
 
C

Chris Austin

I am assuming that the invoice you want to print is already an ASP.Net web
form. If it isn't then you have a couple of options which to go by. But
first, if it is already ASP.Net web form and when the user clicks on the
browser's print button, then you want the page formatted in a printer
friendly format then I would just use the @media print {} in CSS (Cascading
Style Sheets). Using the CSS @media allows the page to look one way for the
screen and another for the printer and you avoid all the messing popup
windows and javascript.

If it is not already in a web form, then you could use a web form, PDF, or
even Crystal. But, personally in the past using web forms worked well when
I had a requirement to display and print an invoice to the end-user.

HTH.

-Chris
~
http://weblogs.austinspad.com/caustin
 
K

Kevin Spencer

Printing in an ASP.Net application happens on the client side. As the
document in the client browser is an HTML document, the browser does the
printing. The browser printing cannot be controlled (much) through code. The
only thing you can really control is the format of the document. What you
have to do is create an HTML document that looks good when printed via the
browser.

Crystal Reports.Net, which comes bundled with Visual Studio.Net, is a web
version of Crystal Reports. If you want to use it to create your invoice,
you may be overdoing it. An invoice is perhaps technically, a report, but
IMHO you'll have a lot less trouble creating your own Invoice page.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top