Printing a TDBGrid

£可爱£侵袭症+ 提交于 2019-12-01 09:41:53

问题


I'm working with Delphi 2009 and I really need to create a button that can print all my data in a DBGrid. I appreciate all the help I can get.


回答1:


Since it is a DB grid then you can create a report using any of the report components you have, or you can do without them by using the printers unit, by iterating over the data and print them using a printer.textout




回答2:


Get TxcellentFormPrinter control below and then you can print the Entire Grid.

http://www.code4sale.com/joehecht/

Hope this helps.




回答3:


You may use the TSMPrintData component from SMReport Autogenerated suite: http://www.scalabium.com/smr




回答4:


I don't know what you want but if you want to set your data into a TDbGrid then set your data into a dataset and link your dataset with the TDbGrid. But if you want to print your data from a DbGrid see Print a TDBGrid



来源:https://stackoverflow.com/questions/1221291/printing-a-tdbgrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!