Big chocolate fish
for Jeremy, but thanks to everyone for their
help with this problem yesterday afternoon. Don't know what I'd
do without this group.
Jeremy's solution
works just fine - does what I want with no AV's
or leaks
BUT...
does anyone
know how to enable the Printer Settings button on the Preview
Form - so users can print just a selected page?
Then I'll leave you
all be for a week or two.
Mark
On 10 Jun 2003 at
13:10, Jeremy North wrote:
>
>
>
>
>
>
I would use this. You have to use _PreviewModal_ in this instance.
>
>
if opendialog1.execute then
>
begin
>
QuickReport1 := TQuickReport1.Create(self);
>
try
>
QuickReport1.Prepare;
>
QuickReport1.QRPrinter.Load(opendialog1.filename);
>
QuickReport1.QRPrinter.PreviewModal;
>
finally
>
QuickReport1.Free;
>
end;
>
end;
>
>
[EMAIL PROTECTED] wrote on 10/06/2003 12:41:17 PM:
>
>
> On 10 Jun 2003 at 12:19, Jeremy North wrote:
>
>
>
> > Any reason you are creating this dialog with application as
>
> > parent? I remember some issue with temp path's being too long
>
> > causing errors. This might be it.
>
> Not sure I understand what you are saying. I have copied the target
>
> .QRP file to the root level on my D:drive and get the same error.
>
> >
>
> > Anything in the destroy/free of the form you are creating?
>
> >
>
> > Hanging try..finally block..............
>
> There is now NO code in the created form (after removing the Close
>
> as suggested by James) Mark
>
> >
>
> > JED
>
> >
>
> > [EMAIL PROTECTED] wrote on 10/06/2003 12:04:21 PM:
>
> >
>
> > > > > I have created a PreviewFm form and placed a TQuickRep
>
> > > > > component (QR1) on this form. The AfterPreview event
>
> > > > > contains just a "Close" statement.
>
> > > > >
>
> > > > > In my app I have the following procedure:
>
> > > > >
>
> > > > > procedure HandleViewReportsClick; //mh 2003-06-10
>
> > > > > begin
>
> > > > > MainForm.OpenDialog.Filter := 'Report Files, *.qrp|*.QRP';
>
> > > > > MainForm.OpenDialog.Title := 'Select file to view';
>
> > > > > MainForm.OpenDialog.InitialDir :=
>
> > > > > ExtractFileDir(Application.ExeName);
>
> > > > >
>
> > > > > if MainForm.OpenDialog.Execute then try
>
> > > > > Application.CreateForm(TPreviewFm, PreviewFm);
>
> > > > > PreviewFm.QR1.Prepare;
>
> > > > > try
>
> > > > > PreviewFm.QR1.QRPrinter.Load(MainForm.OpenDialog.FileN
>
> > > > > ame) ; PreviewFm.QR1.QRPrinter.Preview;
>
> > > > > finally
>
> > > > > PreviewFm.QR1.Free;
>
> > > > > end;
>
> > > > > finally
>
> > > > > PreviewFm.free;
>
> > > > > end
>
> > > > > end;
>
> > > > >
>
> > > > > Any help greatly appreciated
>
> > > > >
>
> > > > > Mark
>
> >
>
> >
>
> >
>
> > This email and any files transmitted with it are confidential and
>
> > intended solely for the use of the individual or entity to whom
>
> > they are addressed. If you have received this email in error
>
> > please notify the [EMAIL PROTECTED]
>
> >
>
> > ------------------------------------------------------------------
>
> > ---- -----
>
> > 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"
>
> > Web Archive at:
>
> > http://www.mail-archive.com/delphi%40delphi.org.nz/
>
> >
>
>
>
>
>
>
>
----------------------------------------------------------------------
>
----- > 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" > Web
>
Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
>
----------------------------------------------------------------------
>
-----
>
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"
>
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
--
Forest Production Systems
Ltd
Creators of PSLog Harvesting
Information System
Web: www.pslog.co.nz