tags:

views:

40

answers:

2

I would like to print simple CSV-like list data from a .NET application. sometimes rows needs to be grouped together and a sum must be calculated and printed.

which is the best way to do it?

printing directly through printing/drawing namespace? con: IMHO doing the page/row/cell calculation and drawing borders will be hard to get right

exporting to a html table an let the browser print it? pro: easy con: don't know if the browser will get the row page break right

exporting to xml/xsl-fo/pdf? pro: easy con: dependencies

any other ideas?

+1  A: 

What about converting the CSV data to a list of objects, then using it as the input for a report? (by using Microsoft Reporting, Crystal Reports, SQL Server Reporting Services, or any other reporting engine)

Konamiman
A: 

Go with the HTML output. If you put it into rows and columns in an HTML table, excel can read that format natively, so all is not lost if it turns out the browser doesn't do what you want.

Chris McCall