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

Designer boittom tab

edited September 2004 in General
Hi,

The report designer has tabs in the bottom where you select the main page
or the sub reports page (if any)

How can I select/change between the Main tab and the sub-report tab from
the application during runtime.


/Ronny

Comments

  • edited September 2004
    Hi Ronny,

    You can use the TppDesigner.ReportTabs property to access the TTabSet used
    in the designer window. Changing this in the OnShow event of the designer
    should open the designer in the given subreport.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    Nico,

    Couldn't find a ReportTab property
    Could you give an example to access the main report tab.

    /Ronny

  • edited September 2004
    Hi Ronny,

    Sorry, the ReportTabs property is located in the TppDesignerWindow class and
    can be accessed through the TppDesigner.Form property. Here is some code I
    just put together that changes the subreport tab as the designer shows.

    uses
    ppDsgner;

    {$R *.dfm}

    procedure Tfm_ppReportPrintTest.Button1Click(Sender: TObject);
    begin
    ppDesigner1.ShowModal;

    end;

    procedure Tfm_ppReportPrintTest.ppDesigner1Show(Sender: TObject);
    begin
    if ppDesigner1.Form is TppDesignerWindow then
    TppDesignerWindow(ppDesigner1.Form).ReportTabs.SelectNext(True);

    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    Nico,

    Thanks, works great.

    /Ronny

This discussion has been closed.