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

Accessing File-> New... from code.

edited December 2005 in End User
For reasons too long to go in to we embed the designer window in our
program.

Therefore we do not have access to your menu bar. This has not been a
problem so far. For example we can call the groups setup as follows:

procedure TfrmReports.mniGroupClick(Sender: TObject);
var
lDesignerWindow : TppDesignerWindow;
FToolbarManager: TppToolbarManager;
begin
lDesignerWindow:=TppDesignerWindow(rptDesign.Form);
lDesignerWindow.mniReportGroups.Click;
end;

What we can't figure out how to call is the New... on the calc tab. I tried
this as a test:
procedure TfrmReports.RzButton1Click(Sender: TObject);
var
lDesignerWindow : TppDesignerWindow;
FToolbarManager: TppToolbarManager;
begin
lDesignerWindow:=TppDesignerWindow(rptDesign.Form);
lDesignerWindow.mniFileNew.Click;
end;

But it brings up the new report window.

Do you have any suggestions?

Thanks in advance,
Rob

Comments

  • edited December 2005

    You can use TppDesigner.Menu to access the menu items. When the Calc tab is
    active, TppDesigner.Menu will return the Menu that is used by the calc
    workspace.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2005
    Thanks, works perfectly.

This discussion has been closed.