Sorry, David
What's wrong with the following?
If Report.QRPrinter.Destination = qrdMetafile then
Showmessage('Preview');
"Undeclared identifier 'qrdMetafile'"
Thanks
Mark
----- Original Message -----
From: "David Brennan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, December 28, 2000 3:29 PM
Subject: Re: [DUG]: QR - Is it currently printing?
> It's a long time since I have played with QuickReports (and I no longer
have
> it installed) but from memory there is a Destination property on the
report
> component which says whether it is printing to a printer or a metafile
(just
> looked it up - constants are qrdMetafile or qrdPrinter). When it is
> previewing the Destination = qrdMetafile and if it is going to a printer
the
> Destination is always qrdPrinter.
>
> Unfortunately it isn't quite that simple - if you call the Prepare method
of
> the report (which people often do to get a page count etc) then
QuickReports
> does a temporary build of the report internally to Destination =
> qrdMetafile. This could be misleading if you are about to call the Print
> method (which will cause QR to run the report again, this time to
> qrdPrinter).
>
> Hope that helps
> David.
> DB Solutions Ltd.
>
> ----- Original Message -----
> From: "Nello Sestini" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 29, 2000 12:01 PM
> Subject: Re: [DUG]: QR - Is it currently printing?
>
>
> > > Now I need to know is it possible to do stuff from within
> > > a Band but only if the report is being >printed (either
> > > directly or from the Preview screen) and not if the report
> > > is just being viewed.
> >
> > > Is this possible? or does QR not know, at the time the band
> > > is being processed, whether it is going >to be sent to the printer?
> >
> >
> > For reasons I've never understood, QR regenerates the whole
> > report for the printer so I think you actually do have a shot at
> > detecting that you are "preparing to print" vs "preparing to
> > preview".
> >
> > I haven't actually played with it - but there is an event
> > TQuickRep.QRPrinter.OnGenerateToPrinter
> > that fires before the preparation that is destined to go to
> > the printer.
> >
> > Not sure - but a reasonable attack might be to supply
> > your own handler in this event to set a flag that your
> > band/field events could examine to determine if you're
> > destined for the printer.
> >
> > -ns
> >
> >
> >
>
> --------------------------------------------------------------------------
> -
> > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> > Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"