This is a migrated thread and some comments may be shown as answers.

Deployment Error

2 Answers 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luke
Top achievements
Rank 1
Veteran
Luke asked on 20 Oct 2020, 12:35 PM

Good Afternoon All,

I have recently created a WinForms application that used the Report viewer.  Everything is working successfully on my machine however on the end users machine they are getting the attached error.

The application uses MySQL Database at the back end and the application set the datasource providername to the mysql data source at runtime.

I have ensured that the the setup project the dependencies for MySQL.Data.dll are visable and being deployed.  

Can someone please help me out with this to try and get it working on the end users machines.

Thanks in advanced

Luke

2 Answers, 1 is accepted

Sort by
0
Luke
Top achievements
Rank 1
Veteran
answered on 20 Oct 2020, 12:41 PM

I forgot to mention all other aspects of the application linking to the Database are working fine.

0
Ivan Hristov
Telerik team
answered on 23 Oct 2020, 08:55 AM

Hello Luke,

When the report is ready to be bound to data, the reporting engine tries to find the data provider by its name, which should be persisted in the report definition - something like "MySql.Data.MySqlClient" or "Devart.Data.MySql" - depending on the MySql provider you use. This provider should be installed on the machine and listed in machine.config. The other option is to have it declared in the application configuration file, as shown in the How to register SqlDataSource data providers without driver installation article (it concerns PostgreSQL, but the approach is the same).

Based on the error visible in the screenshot I assume the MySql data provider is not installed on the end users machine, since the reporting engine cannot locate it. Note that having a reference to the MySql data provider and having its .dll files in the application folder is not enough to make it "recognizable" from the application. The solution here is to either install the MySql data provider so it will make an entry in the machine.config file, or add a <DbProviderFactories> entry in the application configuration file that will "tell" the application to load the specified MySql data provider from the application folder.

If this doesn't help, we'll need more information about the issue and the best way to obtain that information is to add a trace listener to your application and send us the trace log for examination. You can read here how to add a trace listener in your application configuration file: How to: Create and Initialize Trace Listeners.

You can also check this blog post that explains how Telerik Reporting binds to a data source and how the data retrieval works.

Regards,
Ivan Hristov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Luke
Top achievements
Rank 1
Veteran
Answers by
Luke
Top achievements
Rank 1
Veteran
Ivan Hristov
Telerik team
Share this question
or