USING fastreport with mysql database

Magezi SagesseMagezi Sagesse DRCONGO
edited 9:52AM in FastReport .NET
Following the guideline I found in readme file about registering the dll programmatically :
- add the "FastReport.MySQL.dll" reference to your project;
- execute the following code once at the application start:
FastReport.Utils.RegisteredObjects.AddConnection(typeof(MySqlDataConnection));
I execute this in the loading event of my main form but I am getting an error message saying :The 'obj' parameter must be of DataConnectionBase type
and if I remove when I wanna run the report I am getting the error saying: can not found the object mysqldataconnection

Comments

  • edited 9:52AM
    hi did you got how to connect to mysql from fast report i am getting a 20 25 error
    I saw your post may be you got some result please reply. i am getting error like ..


    Error 1 The type or namespace name 'Utils' does not exist in the namespace 'FastReport' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\AssemblyInitializer.cs 4 18 FastReport.MySQL
    Error 7 The type or namespace name 'Utils' does not exist in the namespace 'FastReport' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.cs 10 18 FastReport.MySQL
    Error 2 The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlDataConnection.cs 5 7 FastReport.MySQL
    Error 8 The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.cs 11 7 FastReport.MySQL
    Error 6 The type or namespace name 'Forms' does not exist in the namespace 'FastReport' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.cs 9 18 FastReport.MySQL
    Error 9 The type or namespace name 'DataConnectionBase' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlDataConnection.cs 11 38 FastReport.MySQL
    Error 13 The type or namespace name 'Controls' does not exist in the namespace 'FastReport' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.Designer.cs 185 24 FastReport.MySQL
    Error 3 The type or namespace name 'ConnectionEditors' does not exist in the namespace 'FastReport.Data' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlDataConnection.cs 6 23 FastReport.MySQL
    Error 4 The type or namespace name 'ConnectionEditors' does not exist in the namespace 'FastReport.Data' (are you missing an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.cs 8 23 FastReport.MySQL
    Error 10 The type or namespace name 'ConnectionEditorBase' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlConnectionEditor.cs 15 48 FastReport.MySQL
    Error 12 The type or namespace name 'ConnectionEditorBase' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlDataConnection.cs 91 21 FastReport.MySQL
    Error 11 The type or namespace name 'CommandParameterCollection' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\MySqlDataConnection.cs 61 7 FastReport.MySQL
    Error 5 The type or namespace name 'AssemblyInitializerBase' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Administrator\Downloads\FRNetConnections\Extras\Connections\FastReport.MySQL\AssemblyInitializer.cs 8 38 FastReport.MySQL
  • Magezi SagesseMagezi Sagesse DRCONGO
    edited 9:52AM
    i resolved my problem!!! In which lanuage are you programming?
  • edited 9:52AM
    i resolved my problem!!! In which lanuage are you programming?


    How did you solve this problem? I also encountered this problem.
    Thanks

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.