开发者

Best way to print CSV-like list data

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 n开发者_运维知识库amespace? 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?


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜