问题
Need to generate some financial report where the formatting is controlled by the data
haven't done reporting in a while but does any reporting support that
e.g. based on a flag in the source dataset the row text could be bold the row could have an underlining the report could start a new group header etc.
回答1:
There is a component called the ReportViewer for WinForms which ships with Visual Studio. This will do exactly what you need. You can bind it to one or more DataTables and it will essentially render you a report in PDF or in XLS or what have you. If you don't need to present it to the user, just use the LocalReport class and call its Render() method.
来源:https://stackoverflow.com/questions/1141350/winforms-report-generator-for-pdf-output