Put a tdxcomponentprinter on the form, double-click a dialog box, and click Add. In the pop-up dialog box, select the dxgrid you want to print. After OK, A dxcomponentprinter1link1 is displayed in the first dialog box.
CodeWrite directly in
Dxcomponentprinter1link1. Preview;
You can.
One tdxcomponentprinter control is enough. Multiple dxgrids can be connected.
///////////////////////////////////
See Help for yourself if you are not familiar with it.
Third-party control devexpress printing system v2.5
Www.51delphi.com has the following
Pull a tdxcomponentprinter dxcomponentprinter1 and put it in form,
Add a reportlink dxcomponentprinter1link1, and then
Dxcomponentprinter1link1-> component = dxdbgrid1;
Dxcomponentprinter1link1-> rebuildreport ();
Dxcomponentprinter1-> Preview (1, dxcomponentprinter1link1 );
Dxcomponentprinter1link1-> component = NULL;