ppDesigner - Preview Zoom Setting
RB 9.03
I am setting in a Report property PreviewFormSetting.ZoomSetting =
zsPageWidth, but when I preview it at runtime in design mode (workspace) it
does't work.
How can I set PreviewFormSetting.ZoomSetting = zsPageWidth every time when I
preview a Report from workspace?
Thank You
I am setting in a Report property PreviewFormSetting.ZoomSetting =
zsPageWidth, but when I preview it at runtime in design mode (workspace) it
does't work.
How can I set PreviewFormSetting.ZoomSetting = zsPageWidth every time when I
preview a Report from workspace?
Thank You
This discussion has been closed.
Comments
Are you loading your report from a template? If so, you will either need to
save the template down with this property already set or set the property
inside teh Template.OnLoadEnd event.
If no templates are involved, try placing a break point on the line of code
where you set the zoomsetting and be sure it is firing before the previewer
is loaded.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
doesn't work fine.
As a test I saved a template file with the zoomsetting at zsWholePage, then
created a simple app that loads the template and in the OnLoadEnd event sets
the zoompercentage to zsPageWidth. This works correctly for me. How is
your app different. The code I'm using is posted below.
uses
ppTypes;
procedure TForm1.Button1Click(Sender: TObject);
begin
ppReport1.Template.FileName := 'c:\Test.rtm';
ppReport1.Template.LoadFromFile;
ppReport1.Print;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ppReport1.Template.OnLoadEnd := TemplateOnLoadEnd;
end;
procedure TForm1.TemplateOnLoadEnd(Sender: TObject);
begin
ppReport1.PreviewFormSettings.ZoomSetting := zsPageWidth;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
ppDesigner.
Inside the OnShow event of the designer you can access the Viewer property
of the DesignerWindow object and set this value.
procedure TForm1.ppDesigner1Show(Sender: TObject);
begin
TppDesignerWindow(ppDesigner1.Form).Viewer.ZoomSetting := zsPageWidth;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com