2

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.

bluish
  • 26,356
  • 27
  • 122
  • 180

4 Answers4

4

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

zz1433
  • 3,528
  • 2
  • 28
  • 36
1

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

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

Hope this helps.

Johan Bresler
  • 6,450
  • 11
  • 56
  • 77
0

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

Community
  • 1
  • 1
Ravaut123
  • 2,764
  • 31
  • 46
0

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