Cannot get the instance of a plugin while the designer is open
This code creates a report designer on a form while the form is being created:
report.Designer.Plugins.FindType(typeof(StandardToolbar)) doesnt work because StandardToolbar is internal
report.Designer.Plugins.FindType("StandardToolbar") doesnt work because its obfuscated and its not guaranteed to have the same type name
Any idea how to get the instance?
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
      report.Designer = new Designer(report);
      report.Designer.ShowInPanel(this);
      report.Designer.MainMenuStrip.Visible = false;
      //ToolbarBase tb = (ToolbarBase)report.Designer.Plugins.FindType("StandardToolbar");
      //ToolbarBase tb = (ToolbarBase)report.Designer.Plugins.FindType(typeof(StandardToolbar));
    }
  }
cannot get the instance of StandardToolbar with these methods:report.Designer.Plugins.FindType(typeof(StandardToolbar)) doesnt work because StandardToolbar is internal
report.Designer.Plugins.FindType("StandardToolbar") doesnt work because its obfuscated and its not guaranteed to have the same type name
Any idea how to get the instance?
Comments
We provide our clients the ability to customize an inherited report and we display the designer inside our form.
It's an ntier app so we get the base report and the inherited report via a service (both .net remoting and wcf is supported), open our .net form, load the report using LoadFromStream methods. We don't want them to do anything funny so open, new, save and preview buttons are hidden. Plus we hide the data tab so they don't see anything database related.
They can do minor changes on the report pages and add new memos from available data fields and hide the ones they dont need.
When they are done editing, they click on the save button and the inherited report gets updated on the database via another service call.
Reports are prepared on the application server, so no database connection is opened from the client when a report is requested.
We're using DevExpress .NET WinForms controls and I believe it will look better if we can get it done with FastReports .NET