views:

1056

answers:

2

Well, heres my scenario.

Client/Server winforms application with SQL Express as the DB. I need to be able to print invoice, packing slips etc..

i would like the customer to be able to modify the invoices. ie. be able to put their logo or change font sizes etc...basically format the display.

Things i have considered so far are.

1) Use a template engine (similar to codesmith or mygeneration) and use templates that output HTML. Then print the html page.

2) Use ReportViewer in local mode. I've heard that users can download a plugin for web dev express and edit the local report files. can anyone confirm this?

3) Use Reportviewer in remote mode.

I don't have much experience with ReportViewer so I'm not sure if i should use local or remote mode as well.

Those of you that have done this kind of thing before whats your recommendation?

+5  A: 

After just completing a project with it, I would heartily recommend iTextSharp to create your invoices and other forms as PDFs. In addition to creating PDFs from scratch, you can also use it to fill in PDF forms and/or templates created with Acrobat (or even MS Office/OpenOffice). And it's free.

It's pretty easy to use in Windows apps or in ASP.Net applications. Most of the documentation and the books on it (iText in Action, for example) are about the original Java version, iText. However, there are tutorials and example code on the conversion process and, for the most part, all of the functions and libraries work the same in the .Net version, so adapting the book and reference code has been no problem.

I definitely learned the hard way that HTML and CSS are great for browsers (well, great except for the "every browser interprets it different" problem), but horrible for trying to generate consistent, attractive, and precise printed output and forms.

CMPalmer
+2  A: 

I'm personally using Aspose Words: they use word documents as templates, and I'm using Words bookmarks function to mark and retrieve the fields I need to fill.

Aspose works nicely with Tables (ie: you can add lines to a table, etc...) and sees Word documents as XML documents. You can then save the document as MSWord or PDF.

I wouldn't say it's the greatest library in the world, but it's definitely worth having a look :)

Luk