tags:

views:

62

answers:

4

I am not looking to print the screen capture of the UI but a regular form like something you might fill out at the dmv. What do you use to create these forms/documents how do you merge the data into them and print/print preview?

+1  A: 

I have used XMLFO for this.

http://www.w3schools.com/xslfo/default.asp

Raj More
That is very interesting. Do you use your own technology to print/display the results or a third party tool? Or is this just rendered to the web browser?
Aaron Fischer
We created the templates that we needed and then did a merge with the information with an output to PDF. Very similar to mail merge. We produced some really beautiful Real Estate brochures with this technique.
Raj More
+1. That's a good link. I hadn't heard the term XMLFO. I've worked with XSLT, of course, but this is new to me. Thank you.
David Stratton
A: 

The full version of Adobe Acrobat lets you do this with PDF files.

Edit - added

I know your tags specify that you're looking for a WPF or WinForms away to do this, but my answer is based on my philosophy of "the right tools for the job". Acrobat is standard, works well for specifying exact printing, and pretty much everyone who surfs the web can use it and will understand how to fill out the form.

If you've never used Acrobat to create fillable forms yourself, there's a learning curve and an expense. You'll need to balance that against giving your users something familiar that just works, and has a proven track record.

David Stratton
How is the performance of rendering and merging these PDF's?
Aaron Fischer
Not bad. The biggest issue is the steep learning curve.
David Stratton
How are you prepopulating form fields with data? third party tool?
Aaron Fischer
Yes, a third party tool... http://www.evermap.com/automailmerge.asp
David Stratton
+1  A: 

A lot depends on how you've crafted your UI.

We write windows apps and use Crystal Reports: http://www.crystalreports.com/ and ActiveReports http://www.datadynamics.com/ Neither are free, and both come with their own form designer and programming objects (for printing from your UI).

We prefer Crystal over Active, mostly because we have more years of experience with Crystal.

Filling out the forms with data involves:

  1. Write the data to some standard data store, usually a database record.
  2. Create a form and attach the data store - there are menu items to pick a database, tables, views, etc.
  3. Insert the data fields on the form - there are menu and toolbar items to list the fields and just drag & drop the field you want to wherever it needs to print.
  4. In the program that contains your UI, include an object that prints the form.
A: 

I know I answered once already, but this is a completely different answer so I'm posting a second answer rather than modifying the first (again).

Also, I want to preface this by saying that the other answers that other users have provided are good answers, too. @wagr's suggestion to use Crystal Reports is a good option. I'm just thinking of other options so you have more to choose from.

Getting the user input can be done many ways, so these answers focus on printing nice looking outputs.

For printing: You could also use Word's Mail Merge functionality. You can link to the source DB with an Access DB using Linked Tables, and create a report in Access. (That learning curve isn't too steep). Code an Asp.Net site, and use CSS to make sure it prints nicely (but there are limitations here, of course)

David Stratton