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.
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);
Comments
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Couldn't find a ReportTab property
Could you give an example to access the main report tab.
/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;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks, works great.
/Ronny