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

TppDesignerWindow().Viewer problem in Rb10

edited March 2006 in General

After installing Reportbuilder 10 and recompiling an existing project I
get an error at
TppDesignerWindow(ppDesigner1.Form).Viewer.ZoomSetting := zsPageWidth;
Error: "Undeclared Identifier Viewer".

How can I set the zoomsetting in this case?

Comments

  • edited March 2006

    1. See example code below. The example uses the TppDesigner.OnTabChanged
    event to access the PreviewManager.Viewer property. The Viewer is not
    created until the first time the Preview workspace is accessed. Thus, the
    need to use the OnTabChanged event.

    2. Another option is to create a TppPreview plug-in that configures the
    Viewer. The Preview class manages the Viewer, Toolbar, Outline, etc. and is
    used by the Designer and the Preview Dialog.
    See ppPreview.pas for the code to the default preview plug-in TppPreview.
    The Initialization section at the bottom contain the registration code. You
    can


    Example:

    uses
    ppTypes;

    procedure TForm1.ppDesigner1TabChanged(Sender: TObject);
    begin
    if (ppDesigner1.Form.PreviewManager.Viewer <> nil) then
    ppDesigner1.Form.PreviewManager.Viewer.ZoomSetting := zsPageWidth;

    end;




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.