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

Data Tab

edited November 2004 in General
All,

I need my report designer to start on the data tab.

I have posted this question before and got the following repsponse from Nico
Cizik:


...you will need to override the process ReportBuilder uses to select the
designer tab as well as set the new tab by using the SelectNextPage method
of the TPageControl. Something like the following in the OnShow event of
the designer should work...

ppDesigner1.Notebook.SelectNextPage(False);
ppDesigner1.Notebook.ActivePageIndex := 0;


I have tried this and although the tab does indeed change, I get the problem
that the designer menu is isn't the data menu (that nearly makes sense!).
There must be another process that changes the menu appearance when a
particualr designer tab is clicked. How do I call it or invoke it?

Hope I've explained this well enough.

Regards,

Paul Endersby.

Comments

  • edited November 2004
    Hi Paul,

    In order to update the main menu when you select a tab you need to get a
    hold of the TdaDataManager object. This can be done in a "round about" way
    by typecasting the Page.Tag property as a TdaDataManager. Something like
    the following...

    uses
    daDataManager;

    procedure TForm1.ppDesigner1Show(Sender: TObject);
    var
    lbTest: Boolean;
    begin
    ppDesigner1.Notebook.SelectNextPage(False);
    ppDesigner1.Notebook.ActivePageIndex := 0;

    TdaDataManager(ppDesigner1.Notebook.Pages[0].Tag).ActiveChanging(lbTest);
    end;

    --
    Regards,

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

    Best Regards,

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

    Took a while to respond, but your example code worked a treat. Many Thanks.

    Regards,

    Paul Endersby

This discussion has been closed.