Customization of the designer for end-users

Hello,
we are testing FastReport 4 at the moment and need to clarify a few things, before we decide, if we can use it. I made an other post already and here is the next "problem" we have.

The end-users of our software shall have the possibility to edit the reports (which we give them) and / or to create new reports. Here it's important for us to be able to determine, which objects / components / toolbars / tabs / whatever shall be visible / accessible within then designer for the end-user and which shouldn't.

In one case it can be necessary to remove the code page / tab or the classes page / tab or the button for insertion of bands etc.
In an others case these components can be neede again, but some others not etc.

Here FastReport seems to have some "difficulties".

A few things which I was able to get to work:
var
   Designer: TfrxDesignerForm;
begin
   frxReport1.DesignReportInPanel(PanelDesigner);

   Designer := TfrxDesignerForm(frxReport1.Designer);

   Designer.NewB.Visible := false;
   Designer.OpenB.Visible := false;
   Designer.NewDialogB.Visible := false;
   Designer.GroupB.Visible := false;
   Designer.VariablesB.Visible := false;
   Designer.StatusBar.Visible := false;
   Designer.UngroupB.Visible := false;

   ...
end;

With this it's possible to hide some Toolbars, ToolbarButtons etc. That's good, but I need to do much more, actually.

One example fo this: the button for band-insertion. After looking into sources etc. I figured out this kind of a solution:
if Designer.ObjectsTB1.ButtonCount > 0 then begin
      for i := 0 to Designer.ObjectsTB1.ButtonCount - 1 do begin
         // (after looking into Unit frxDesgn, from row 1715, ObjectBandB := TToolButton.Create(Self);)
         if Designer.ObjectsTB1.Buttons[i].ImageIndex = 1 then begin
            Designer.ObjectsTB1.Buttons[i].Visible := false;
         end;
      end;
   end;

This works first, even if it's actually not good to check the ImageIndex of a toolbutton for this. Though once I click onto a tab or something, the button appears again, which is bad. It's just hard coded in the sources [img]style_emoticons/<#EMO_DIR#>/dry.gif" style="vertical-align:middle" emoid="<_<" border="0" alt="dry.gif" /> An other critical point: areas like DataTree, ReportTree, Inspector, Code page etc. In the most cases our end-users shall not have the possibility to work with classes or functions of the DataTree. The same for the code page etc. It's just not possible to handle those areas properly. I can hide the whole DataTree with[/img]
Designer.DataTree.Hide;
but I can't "remove" single pages...
I can set the tree and the panel as invisible:
   Designer.DataTree.FunctionsPn.Visible := false;
   Designer.DataTree.FunctionsTree.Visible := false;
   Designer.DataTree.ClassesPn.Visible := false;
   Designer.DataTree.ClassesTree.Visible := false;
but the tabs, which are created at tun time and are private [img]style_emoticons/<#EMO_DIR#>/dry.gif" style="vertical-align:middle" emoid="<_<" border="0" alt="dry.gif" /> , are still there etc. All in one FastReport seems to be not prepared / designed for such usage, which I can't understand, since it's a very important feature for software developers, which are using FastReport in their software, to be able to customize the designer for the need of the situation and to present it to the end-user in the way it is desired, so the end-user can't do more than the developer wants to allow him. Maybe I just can't find the way to do it, but if the feature isn't fully available (some parts do exist more or less), then it's a very big weak point of FastReport, which just doesn't allow to creat professional applications[/img][img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I really hope it's possible somehow or is at least planned for the near future. Please let me know, how it looks about this issue. Kind regards, Mark[/img]

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.