如何使用 C# 从数据库打印(在打印机上)表格
我从事一些从 vb6 迁移到 web (asp.net) 的项目。我需要打印某种报告 - 数据库中的表格以及带有日期和时间的简单标题的数量。在 vb 中它是使用 vsPrinter 对象实现的。 C#中是否有任何类的功能与vb6中的该类类似?如果.net中没有这样的东西,那么最简单的方法是什么?
感谢您的帮助!
I work on some project that is migrating from vb6 to web (asp.net). I need to print some kind of report - A table from database and number of simple headers with date and time. In vb it was implemented using vsPrinter object. Is there any Class in C# that is similar to this Class in vb6 in its functionality? If there in no such thing in .net, what is the easiest way to do this?
Thanx for assistance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请记住,您正在转向网络,因此您无法访问硬件打印机控件。您只能访问浏览器为您提供的内容。如果您没有对此做任何花哨的事情,您可以做以下两件事之一。
Remember you are moving to the web so you don't have access to the hardware printer controls. You only have access to what the browser gives you. If you are not doing anything fancy with this you can do one of two things.
我认为最简单的方法是使用任何报告工具,最强大的工具之一是 Crystal reports,只需谷歌一下,您就会发现很多有用的教程,例如:
您还可以找到在 Crystal 下,有很多关于它的有用线程Reports 标记,例如:
I think the easiest way would be by using any reporting tool, one of the powerfull tools is Crystal reports, just google it an you will find alot of useful tutorial such as:
You can also find alot of useful threads about it here in SO under Crystal Reports tag, like: