if you are using RB 7.x ... The main report component (TppReport) now contains a PreviewFormSettings property. Use this to control the initial WindowState, ZoomSetting and ZoomPercentage of the PreviewForm.
Or use the OnCreatePreviewForm event, and use the following code (I cut and paste out of my app, and clipped a bit, so it may not be exact, but it is close):
var lPF: TppCustomPreviewer; lViewer: TppViewer; begin lPF := TppCustomReport(Sender).PreviewForm; lViewer := TppViewer(lPF.Viewer); lPF.WindowState := wsMazimized; lViewer.ZoomSetting = zs100Percent; end;
Comments
if you are using RB 7.x ...
The main report component (TppReport) now contains a PreviewFormSettings property. Use this to control the initial WindowState, ZoomSetting and ZoomPercentage of the PreviewForm.
regards,
Chris Ueberall;
Or use the OnCreatePreviewForm event, and use the following code (I cut and
paste out of my app, and clipped a bit, so it may not be exact, but it is
close):
var
lPF: TppCustomPreviewer;
lViewer: TppViewer;
begin
lPF := TppCustomReport(Sender).PreviewForm;
lViewer := TppViewer(lPF.Viewer);
lPF.WindowState := wsMazimized;
lViewer.ZoomSetting = zs100Percent;
end;
--
Ed Dressel
Team DM
How can it be changed with this version?