Here are some code examples for how to use the TPrintGrid component.

Drop it on a form that uses a DBGrid.  Specify the name of the grid
in the DBGrid property.

If you use the PrintDialog method to print, the user can:
   1) chg printers
   2) chg DPI, or specify Draft vs. High Quality
   3) chg Orientation
   4) choose to print to a file
   5) whatever else the printer driver supports


To export to a file without any dialog box at run time:
------------------------------------------------------
PrintGrid1.PrintFileDir:='C:\EXCEL\DATAIN';
PrintGrid1.PrintFileName:='FNAME.LST';
PrintGrid1.SaveToFile;   { do it }


To print on printer without any dialog box at run time:
-------------------------------------------------------
PrintGrid1.Print;  { dflt is to use printer }


To print on printer with a std print dialog box at run time:
-----------------------------------------------------------
PrintGrid1.PrintDialog;  { user can choose "Print to File" if desired }


====================================================================
Here is a more agressive example, which shows how to tweak which
columns are to be printed, the column sizes, and column names:

procedure Form1.PrintClick(Sender: TObject);
var
  sava, savb, savc, savd, save: Integer;
  savestr: String;
begin
  Screen.cursor:= crHourGlass;
  DBGrid1.Datasource.Dataset.DisableControls;

  { Save orig widths }
  sava:=DBGrid1.Fields[0].DisplayWidth;
  savb:=DBGrid1.Fields[1].DisplayWidth;
  savc:=DBGrid1.Fields[2].DisplayWidth;
  savd:=DBGrid1.Fields[3].DisplayWidth;
  save:=DBGrid1.Fields[4].DisplayWidth;

  { Save name of first column }
  savestr:=DBGrid1.DisplayName;

  { tweak column sizes }
  DBGrid1.Fields[0].DisplayWidth:=4;  { track # }
  DBGrid1.Fields[1].DisplayWidth:=38; { comments }
  DBGrid1.Fields[2].DisplayWidth:=3;  { opr }
  DBGrid1.Fields[3].DisplayWidth:=3;  { ocr }
  DBGrid1.Fields[4].DisplayWidth:=9;  { due date }

  { PIck a new name for first column }
  DBGrid1.Fields[0].DisplayName:='TRK ID';

  { don't show this field }
  DBGrid1.Fields[5].visible:=false; 

  { We'll use the form's caption as the name of the report }
  PrintGrid1.Title := Caption;  
  PrintGrid1.Orientation:=poPortrait; { dflt to portrait layout }

  { Print with the interactive std printer dialog }
  PrintGrid1.PrintDialog;

  { restore orig widths }
  DBGrid1.Fields[0].DisplayWidth:=sava;
  DBGrid1.Fields[1].DisplayWidth:=savb;
  DBGrid1.Fields[2].DisplayWidth:=savc;
  DBGrid1.Fields[3].DisplayWidth:=savd;
  DBGrid1.Fields[4].DisplayWidth:=save;

  { Restore name of first column }
  DBGrid1.DisplayName:=SaveStr;

  { re-enable this column }
  DBGrid1.Fields[5].visible:=true; 

  DBGrid1.Datasource.Dataset.EnableControls;
  Screen.cursor:= crDefault;
end;
