tags:

views:

687

answers:

8

I'm working on a billing system for a utility company, and we have the following requirements:

  • Batch-generate and print approximately 1,500 bills per day that we then mail to customers
  • Save the bill in a format that can emailed to the customer and also archived (probably PDF)
  • Built with .NET with MS SQL Server database back-end

I'd like some advice about the best way to accomplish this. I'm thinking about building a WPF application that would have the bill template that we bind the bill data to and print from. But I haven't used WPF before so I'm not sure if that's the best technology to use, and I can't get my head around how the batching and PDF conversion would work.

Any thoughts? Would WPF work, or is there a better solution?

A: 

Maybe you should try with ActiveReports.NET or DevExpress XtraReports to generate the reports first by code. Both have PDF export support so you can generate PDF files and send them by mail.

Eduardo Campañó
+3  A: 

If you are using a SQL Server backend, Reporting Services should work for you.

Otherwise I would recommend a third-party report generator that fits your reporting needs and create an app that uses it to create & export the reports.

Austin Salonen
A: 

Check out this book, (http://www.apress.com/book/view/9781590598542) it gives many different scenarios, including emailing reports, report generation service, etc. Its regarding client side reporting, but it applies equally well to server side (design side anyways). this may have its advantages doing it client side (or dediacted server) as you can fully control the automation process. But thats if you want to go with .NET reporting.

And yes you can use WPF.

mattlant
One more note, Both client side and server side .net reports can be converted to PDF.
mattlant
A: 

Even with SQL Server you may want to look at the client side reports functionality. It really fits better IMO with what you want. You can still query and get all the data you need form the server, but it allows you to have complete control over the automation process. Maybe you want to run it as a service, every day the report is generated by the service, converted to PDF and copied to disk and auto emailed. The client side can do all that and easily. And there is no reliance on reporting services or IIS, or having to have any of that configured.

mattlant
+1  A: 

I strongly recommend working with a reporting tool that provides native support for exporting to PDF, it is much easier for management purposes if you can start with a single format and report to handle both the printing and archiving of information.

If you are truly doing batch processing, I wouldn't see WPF as a needed component as a batch job you don't really have much of a UI, if any at all, depending on how you truly implement this.

If I were you I would focus on creating a batch processor that could be either running as a windows service, or scheduled to run at specific intervals to accomplish its job.

Mitchel Sellers
A: 

You could also look at itextSharp. Its a .net pdf writing tool and is a port of the Java itext. The limited playing I did with it made pdf writing simple and fun.

MagicKat
+1  A: 

You can get a good printing features out of WPF since the new technology Paper format XPS document is a replacement for PDF. And it has great programming support too. A blog from pettzold http://www.charlespetzold.com/blog/2006/02/201111.html regarding WPF printing.

Jobi Joy
A: 

On one of the projects I work on we use list & label.

Basically you have a .NET API, you pass it a DataSet and then you make templates referencing the columns in the dataset, which can at least be printed (and I suppose exported to PDF too but didn't check...)

I didn't work with it myself tho so can't say much about quality.

Tobi