Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Previewformcreate

edited April 2008 in End User
Hi

In my enduser app i want to show all preview reports maximized and
100percent.
I Use this code:

ppReport.Template.OnLoadEnd := LoadEndEvent;

procedure TRsFrmIbxRBuilderLaunchExplorer.LoadEndEvent(Sender : TObject);
begin
ppReport.OnPreviewFormCreate := DoPeviewFormCreate;
end;

procedure TRsFrmIbxRBuilderLaunchExplorer.DoPeviewFormCreate(Sender:
TObject);
begin
ppDesigner.Report.PreviewForm.WindowState := wsMaximized;
TppViewer(ppDesigner.Report.PreviewForm.Viewer).ZoomSetting :=
zs100Percent;
end;


The methods are called , but the preview form is still small.

Eric

Comments

  • edited April 2008
    Hi Eric,

    In my quick testing I was able to set the WindowState property successfully
    from the PreviewFormCreate event. Which version of ReportBuilder are you
    using? Out of curiosity why are you accessing the report object from the
    designer? Are you trying to maximize the designer window as well or are you
    simply calling Report.Print? There is a WindowState property of the
    Designer object as well if you would like to control that.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2008
    Hi Nico

    The code i use was supplied by you some time ago.
    Just setting the previewformproperties works!
    Using 10.04

    I'm accessing the report from the launcher unit.
    Setting the ppDesigner property Windowstate to maximized does not work.

    Eric

  • edited April 2008
    The designer is controlled by the RBuilder.ini file. If you would like to
    take control of the initial window state of the designer you can simply
    delete this file and assign the Designer.WindowState property manually (or
    set this in your application and deploy the RBuilder.ini).

    Otherwise, if you always want to take control over the designer window
    properties, you need to be sure you set them in the OnShow event which fires
    late enough not to be overwritten by the ini file info.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.