Board index » delphi » QR 3.01

QR 3.01

Preview Quick Report has 3 buttons
ZoomFit
Zoom100
ZoomToWidth     (button default)

How to fix button Zoom100 to Default?

p...@femanet.com.br

 

Re:QR 3.01


Put this code in the 'OnPreviewFormCreate' event of your report.

yourReport.PreviewForm.WindowState := wsMaximized;
TppViewer(yourReport1.PreviewForm.Viewer).ZoomSetting := zs100Percent;

Re:QR 3.01


Where is event PreviewFormWindowState?
I not find
has Delphi 4.01 and QR 3.01

p...@femanet.com.br

Stacey R. Brodsky escreveu na mensagem <35EDC0DB.71C3E...@flinet.com>...

Quote
>Put this code in the 'OnPreviewFormCreate' event of your report.

>yourReport.PreviewForm.WindowState := wsMaximized;
>TppViewer(yourReport1.PreviewForm.Viewer).ZoomSetting := zs100Percent;

Re:QR 3.01


If you select your TppReport component and then go to the Events page of
the Object Inspector, you should find an event called
'onpreviewformcreate'.

Double click on this to get into the code editor.

Say your report name is 'YourReport'.  Just put the following two lines
of code in, substituting your own report name where 'YourReport' is
located :

YourReport.PreviewForm.WindowState := wsMaximized;
TppViewer(YourReport.PreviewForm.Viewer).ZoomSetting := zs100Percent;

When your report executes it's preview method, the above event will
fire, and your form will come up maximized, and the report will be 100%.

Re:QR 3.01


Where is component TppReport in Delphi 4?

p...@femanet.com.br

Stacey R. Brodsky escreveu na mensagem <35EF0E76.1F85A...@flinet.com>...

Quote
>If you select your TppReport component and then go to the Events page of
>the Object Inspector, you should find an event called
>'onpreviewformcreate'.

>Double click on this to get into the code editor.

>Say your report name is 'YourReport'.  Just put the following two lines
>of code in, substituting your own report name where 'YourReport' is
>located :

>YourReport.PreviewForm.WindowState := wsMaximized;
>TppViewer(YourReport.PreviewForm.Viewer).ZoomSetting := zs100Percent;

>When your report executes it's preview method, the above event will
>fire, and your form will come up maximized, and the report will be 100%.

Re:QR 3.01


PHG,

I am so sorry, I use Report Builder, and somehow confused it with Quick
Reports. Due to my oversight, I decided to see if I could find you the
info you were looking for.  I have looked at some of the help for Quick
Reports though, and found some info on preview.  Quick Reports has an
event called 'OnPreviewEvent'.  If you have the source code for Quick
Reports, then you need to edit the QRPrev.pas file.  Change the
zoomsetting for the preview.  If not, then they suggest that you create
your own preview form, and use the following code in the
'OnPreviewEvent' of the report.

Replace MyPrevForm with the name of the form that contains your
QRPreview comp.
Replace QRPreview with the name of you QRPreview comp.

procedure RepForm.MyReportOnPreviewEvent(Sender : TObject);
begin
  MyPrevForm.QRPreview.QRPrinter := TQRPrinter(Sender);
  MyPrevForm.Show;
end;

Unfortunately, you then have to provide the users with controls on your
preview form, ie.  print, etc.

Hope that this can help you in some way.  You may want to look into the
Report Builder comps.  They have a great set of components for
reporting.  It's definitely worth the money.  They also provide you w/
free support.

Quick Reports home page is http://www.qusoft.com/
Report Builders home page is http://www.digital-metaphors.com/

Other Threads