Board index » delphi » QR3 - professional, previewmodal, previewmodeless and paradox tables

QR3 - professional, previewmodal, previewmodeless and paradox tables

Can anyone tell me if paradox tables are the kind suitable for use with
previewmodal and previewmodeless. I am having problems using them.
Here is the code I wrote for running a report

procedure reportmenuitemOnclick1 (sender: TObject);
var
    reportform: TQuickReportForm;
    PreviewForm: TPreviewForm;
try
    reportmenuitem.enabled := False;

    reportform := TQuickReportForm.create(self); {a normal form containing
the quickreport}
    PreviewForm := TPreviewForm.create(self); {and mdi child containing my
own preview)
    reportform.UsePreview := PreviewForm; {a public property holdin which
preview to use}

    table1.open;
    reportform.Quickreport1.preview;

finally
    table1.close;
    reportmenuitem.enabled := true;
end;

end;

This procedure is not perfect at the moment, not sure if I have got it
right. The execution stops at th line where the preview is executed,
although I can still execute other menu comands, it is just that when I
close the preview form execytion will begin at the finally statement.

This can cause problems as whn I close the form that contins the menu
command and later close the preview form, execution begins at finally, the
table is closed, which is OK as it still exists but the menuitem no longer
does and an error occurs.

There has got to be a neater way, and I would also like to use
previewmodeless instead of preview which would mean rewriting the procedure.

Any help greatly appreciated, thanks in advance

n.b.

on my report form I have Quickreport1 with the procedure similar to

procedure Quickreport1OnPreview (QPrinter: TObject);
begin
    UsePreview.QPreview1.QPrinter := QPrinter;
    UsePreview.Show;
end;

 

Re:QR3 - professional, previewmodal, previewmodeless and paradox tables


I've succeded in getting this working for 100% working.
I cannot share code because it is copyrighted, but after long
programming sessions i succeeded.

Moral: It CAN be done.

--
Neal Smit
coax...@telekebel.nl
' A good programmer looks both ways
 before crossing a one way street'
Leon Sinagra heeft geschreven in bericht <77a66g$l...@forums.borland.com>...

Quote
>Can anyone tell me if paradox tables are the kind suitable for use with
>previewmodal and previewmodeless. I am having problems using them.
>Here is the code I wrote for running a report

>procedure reportmenuitemOnclick1 (sender: TObject);
>var
>    reportform: TQuickReportForm;
>    PreviewForm: TPreviewForm;
>try
>    reportmenuitem.enabled := False;

>    reportform := TQuickReportForm.create(self); {a normal form containing
>the quickreport}
>    PreviewForm := TPreviewForm.create(self); {and mdi child containing my
>own preview)
>    reportform.UsePreview := PreviewForm; {a public property holdin which
>preview to use}

>    table1.open;
>    reportform.Quickreport1.preview;

>finally
>    table1.close;
>    reportmenuitem.enabled := true;
>end;

>end;

>This procedure is not perfect at the moment, not sure if I have got it
>right. The execution stops at th line where the preview is executed,
>although I can still execute other menu comands, it is just that when I
>close the preview form execytion will begin at the finally statement.

>This can cause problems as whn I close the form that contins the menu
>command and later close the preview form, execution begins at finally, the
>table is closed, which is OK as it still exists but the menuitem no longer
>does and an error occurs.

>There has got to be a neater way, and I would also like to use
>previewmodeless instead of preview which would mean rewriting the
procedure.

>Any help greatly appreciated, thanks in advance

>n.b.

>on my report form I have Quickreport1 with the procedure similar to

>procedure Quickreport1OnPreview (QPrinter: TObject);
>begin
>    UsePreview.QPreview1.QPrinter := QPrinter;
>    UsePreview.Show;
>end;

Re:QR3 - professional, previewmodal, previewmodeless and paradox tables


Quote
Default wrote:

> I've succeded in getting this working for 100% working.
> I cannot share code because it is copyrighted, but after long
> programming sessions i succeeded.

> Moral: It CAN be done.

Even if you can't share source code, at least give a few hints as to how
to go about it.  Don't take this as a flame, but this sort of
tantalizing reply ("it can be done, but I won't tell you how") is not
very helpful.

Just my $0.02 :)

--
Corey Murtagh
The Electric Monk
Quidquid latine dictum sit, altum viditur!
NB: I charge NZ$100 processing and archival fee for Unsolicited
Commercial Email
    If you do not agree to this processing fee, do not send me UCE.

Other Threads