by CAdeBiasio » Mon Aug 20, 2012 3:05 pm
Maybe (better: surely) I'm late, maybe my reply could come handy for other users having the same problem. In my experience I've found that reporting on paper is a very delicate and hard job to do for a programmer, and even if I developed several applications able to print out nicely formatted reports, I rather go for the "right tool to do the right job", especially when huge amounts of data are implied in the request.
In the specific, which is the BEST product around for printing data grids? Yep, that's MS Excel. Then I'd suggest that you create a "template", that's an Excel worksheet with all the required formatting (headers, cell formatting/colors, rows to print each page, and so on), then whenever you need to print the content of a grid of yours, you "simply" make a copy of that template and inject data in it, issueing the Print method at the end. This of course requires that you have MS Office (at least, MS Excel) installed on your PC (... but who doesn't?), and that you know how to do some OLE-Server integration in your App. Not THAT easy, but manegeable. And the results are *excellent*.
Claudio