EhLib
ContentsIndexHome
PreviousUpNext
Using TPrintDBGridEh component

TPrintDBGridEh allows printing DBGridEh components on the printer. 

Select TPrintDBGridEh in Delphi IDE component palette and drop it on a form. Select TDBGridEh component in DBGridEh property. Use Print and Preview procedure to print grid on a printer or to preview grid in a preview Form.

Rich text before and after grid

TPrintDBGridEh allows to print/preview rich text before and after grid. Use AfterGridText and BeforeGridText to specify text. Using SetSubstitutes method you can substitute text in BeforeGridText and AfterGridText properties upon print/preview process.

Features that current version of TPrintDBGridEh is not supported.

This version of TPrintDBGridEh does not support next features:

  • TPrintDBGridEh can not print/preview several grids on the single page.
FAQ List

Q: How to print/preview grid on page in landscape orientation. 

A: TPrintDBGridEh doesn’t have special properties to set page orientation. To do it, you need to set orientation of virtual printer before calling Print or Preview procedure. Like this code:  

uses ......, PrViewEh, Printers.
..............
procedure TForm1.bPreviewClick(Sender: TObject);
begin
  PrinterPreview.Orientation := poLandscape;
  PrintDBGridEh1.Preview;
end;
Copyright (c) 1998-2013. All rights reserved.
What do you think about this topic? Send feedback!