How to use Plugin Manager
FastReport.Net provides a plugin mechanism for extending the functionality of the report designer. Most of these plug-ins are for adding database connectors in the report designer. But there are others. For example, those which add new controls to the designer.
But before using plugins, you must first compile them. Source codes are in the delivery FastReport.Net. That is, you need the presence of the MS Visual Studio development environment in order to use the plugins.
The mechanism for adding plug-ins that existed earlier is frankly saying not very convenient. Let's recall the way it works.
In the report designer, open the File-> Options menu, the Plugins section:
Add a plugin using the Add button. Just select the dll file. However, in order for the added plugin to work, you need to restart the designer.
What have we got now? Separate plugin manager application. It finds all available plugins and allows you to select the ones you need to connect before launching the report designer. This decision was suggesting itself long ago, because restarting the designer after each addition of the plug-in is not very convenient.
Let's take a look at the new plugin manager in more details. You need to pre-compile it. Then, run it. When you first start you will see the settings window:
• Package cache location (Nuget): - in order not to download packages each time, the package downloaded once is saved in the cache;
• Plugins path - a folder for storing the assembled plug-ins;
• Fr dll path - the package manager is built for a specific version of the FastReport library;
• Framework - it is also important to choose a framework that matches the report designer. The default is .net framework 4.0;
• Product - allows you to select a FastReport product for which plugins are installed. Now only FastReport is available, that is, FastReport.Net. In the future, FastReport.Desktop will be added;
• Language - localization of the plugin manager interface. Changing requires a restart of the program.
After setting up, the plugin manager is available to us. In the window on the left you will see the available plugins for installation. The source codes of these plugins are located on a remote server. Therefore, an Internet connection is required when working with a package manager. In addition, to build plugins some libraries from Nuget will be required.
So, in the manager, we can install or remove plugins. Let's install a plugin connector to connect to the MySQL database. To do this, mark the appropriate combo box and click the button “Install Plugins”. At the same time, the report designer should be closed. The package manager will download the source of the selected plug-ins, compile them (.Net Framework is required) and install it into the designer.
A plugin was added to the window on the right, this indicates its successful installation. Check it out. Run the report designer and add a new data source to the report:
And we see that there is MySQL connection in the list of available connectors. We can also check the list of installed plugins in the settings of the File-> Options designer:
In the list of installed plugins - MySQL.
The current version of the plug-in manager works only with database plugins. Of course, in future versions all possible plugins will be available for installation.
If errors occurred during the installation of the plugin, you can find out about them in the plugin installation log: C:\Users\username\.fastreport\net\pluginmanager\plugins\logs.txt