Главная страница | назад





Article #17976: Printing Delphi controls using QuickReports

 Question and Answer Database
FAQ2976D.txt — Printing Delphi controls using QuickReports
Category :Quick Reports
Platform :All-32Bit
Product :
Question:
Can I print any standard Delphi control using QR?
Answer:
No, a control has to be descending from TQRPrintable to
be printed on a QuickReport.
However, if you want, you can drop a TQRImage on a
QuickReport and then do something like this:
procedure TForm1.Button1Click(Sender: TObject);
var
DC : HDC;
begin
DC := GetDC(Button1.Handle);
BitBlt(QuickReport2.QRImage1.Canvas.Handle,0,0,
Button1.Width,Button1.Height,DC,0,0,SrcCopy);
ReleaseDC(Button1.Handle,DC);
QuickReport2.Preview;
end;
4/2/99 12:18:28 PM

Last Modified: 01-SEP-99