Toggle navigation
ReportBuilder Support Forums
Categories
Discussions
Activity
Sign In
Home
›
General
ReportBuilder 22.06 now available including Delphi 12.2 support!
New Blog Posts: Merging Reports -
Part 1
and
Part 2
Designer without open/save file - menu items
rbuser
August 2002
edited August 2002
in
General
Hi
How can i set the menuitems like "Open report" or "Save report" invisible?
When the user closes the designer the programm should take the control for
saving the reports.
Best regards
Robert
Comments
digitalmetaphors
August 2002
edited August 2002
You can edit the menu property of the designer. Search this newsgroup for
prior questions on this. It would be something like:
unit HideSave;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ppEndUsr, ppComm, ppRelatv, ppProd, ppClass, ppReport,
ppBands, ppCache;
type
TForm1 = class(TForm)
ppReport1: TppReport;
ppDesigner1: TppDesigner;
Button1: TButton;
ppHeaderBand1: TppHeaderBand;
ppDetailBand1: TppDetailBand;
ppFooterBand1: TppFooterBand;
procedure Button1Click(Sender: TObject);
procedure ppDesigner1TabChanged(Sender: TObject);
procedure ppDesigner1TabChange(Sender: TObject; NewTab: String;
var AllowChange: Boolean);
private
{ Private declarations }
FNewTab: String;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
raIDE, daIDE;
procedure TForm1.Button1Click(Sender: TObject);
begin
FNewTab := 'Design';
ppDesigner1.Menu.Items[0].Items[4].Visible := False;
ppDesigner1.Menu.Items[0].Items[5].Visible := False;
ppDesigner1.Menu.Items[0].Items[6].Visible := False;
ppDesigner1.ShowModal;
end;
procedure TForm1.ppDesigner1TabChanged(Sender: TObject);
begin
if (FNewTab = 'Calc') then
begin
ppDesigner1.Menu.Items[0].Items[0].Visible := False;
ppDesigner1.Menu.Items[0].Items[1].Visible := False;
end
else if (FNewTab = 'Design') or (FNewTab = 'Preview') then
begin
ppDesigner1.Menu.Items[0].Items[4].Visible := False;
ppDesigner1.Menu.Items[0].Items[5].Visible := False;
ppDesigner1.Menu.Items[0].Items[6].Visible := False;
end;
end;
procedure TForm1.ppDesigner1TabChange(Sender: TObject; NewTab: String; var
AllowChange: Boolean);
begin
FNewTab := NewTab;
end;
Cheers,
Jim Bennett
Digital Metaphors
Digital Metaphors Corporation
http://www.digital-metaphors.com
info@digital-metaphors.com
This discussion has been closed.
Comments
prior questions on this. It would be something like:
unit HideSave;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ppEndUsr, ppComm, ppRelatv, ppProd, ppClass, ppReport,
ppBands, ppCache;
type
TForm1 = class(TForm)
ppReport1: TppReport;
ppDesigner1: TppDesigner;
Button1: TButton;
ppHeaderBand1: TppHeaderBand;
ppDetailBand1: TppDetailBand;
ppFooterBand1: TppFooterBand;
procedure Button1Click(Sender: TObject);
procedure ppDesigner1TabChanged(Sender: TObject);
procedure ppDesigner1TabChange(Sender: TObject; NewTab: String;
var AllowChange: Boolean);
private
{ Private declarations }
FNewTab: String;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
raIDE, daIDE;
procedure TForm1.Button1Click(Sender: TObject);
begin
FNewTab := 'Design';
ppDesigner1.Menu.Items[0].Items[4].Visible := False;
ppDesigner1.Menu.Items[0].Items[5].Visible := False;
ppDesigner1.Menu.Items[0].Items[6].Visible := False;
ppDesigner1.ShowModal;
end;
procedure TForm1.ppDesigner1TabChanged(Sender: TObject);
begin
if (FNewTab = 'Calc') then
begin
ppDesigner1.Menu.Items[0].Items[0].Visible := False;
ppDesigner1.Menu.Items[0].Items[1].Visible := False;
end
else if (FNewTab = 'Design') or (FNewTab = 'Preview') then
begin
ppDesigner1.Menu.Items[0].Items[4].Visible := False;
ppDesigner1.Menu.Items[0].Items[5].Visible := False;
ppDesigner1.Menu.Items[0].Items[6].Visible := False;
end;
end;
procedure TForm1.ppDesigner1TabChange(Sender: TObject; NewTab: String; var
AllowChange: Boolean);
begin
FNewTab := NewTab;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com