![](/forums/images/avatarimages/427f9463-2cba-4b9a-a7ff-eec8a1229c9fsatya.png)
I am creating the report with attaching database connection and tables by taking the class library , and i am saw the report on preview tab with database records(up to this working fine)
Now i am take the visual studio project , and attach the above report to ReportViewer and run the project then it shows following error
-----------------------------------------------
An error has occurred while processing
Report '':
Unable to establish a connection to the database. Please, verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application. ------------- InnerException ------------- Format of the initialization string does not conform to specification starting at index 0. |
10 Answers, 1 is accepted
As the message clearly states, you should copy the connectionString from the report class library to the config file of your actual application (web.config for web site/app, app.config for windows forms).
Best wishes,
Steve
the Telerik team
![](/forums/images/avatarimages/default.gif)
I'm getting the same error as Nagadurgababu.
At design time I have bound data to my Table (using the Table Wizard) via an SQLDataSource, which i have created previously. It renders fine in the Preview tab. However when i try to bind a DataTable (with the same schema as the one coming through my SQLDataSource) programmatically to the DataSource property (actually it is: ReportSource.DataSource) of my report then i get the exact same error as mentioned (by Nagadurgababu).
This is the first Telerik report I'm building, so i might be missing a trick or two. I have searched and read wide to try and get to the bottom of this problem, but haven't come up with a solution yet.
So, your guidance would be much appreciated.
I'm using Reporting Q1 2011
Thanks IA
Yusuf
![](/forums/images/avatarimages/default.gif)
Cheers!
![](/forums/images/avatarimages/default.gif)
Cheers
Yusuf
![](/forums/images/avatarimages/default.gif)
I am also getting the same error when using telerik reports.Unable to establish a connection to the database.
Please, verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application.
I have check the connection string in web config file of project and in class library also.They both are same.
Something must be different, note that the report is looking for the name of the connection, so even if the connectionString is correct, if the name differs, it would not find it. Also note that this scenario is only valid if you have used a saved connection string as connectionString for your report data source, otherwise the connectionString would be hardcoded in the report itself, in the InitializeComponent method. So if that connectionString is not valid for your SQL Server you should change it accordingly.
Greetings,
Steve
the Telerik team
FREE WEBINAR ON THE NEW REPORT DESIGNER! Join us on Friday, June 29 at 10:00 AM for a comprehensive demo of the official version of the standalone Report Designer and find out how easy it is to empower your users with creating, editing and sharing ad-hoc reports. The webinar will go through a real-world scenario of creating reports, embedding them in your application(s), and distributing them within your organization. We will also cover the newly added support for sub-reports, navigation actions (such as drill-down and drill-through), and report sources. Register here and bring your questions with you. We’ll try to address them during the webinar! You may even win a Telerik Ultimate Collection license! Register today >>
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/default.gif)
Would love to see updated Telerik TV episodes. The ones I am watching are from 2009.
You can follow the steps illustrated in the SqlDataSource Wizard article to set your SqlDataSource component.
In your support ticket #833478 you can find additional information on your concrete connectivity problem with the SqlDataSource component.
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
![](/forums/images/avatarimages/default.gif)
Got same error , unable to get connection string....
After adding MySql.Data and MySqlConnector Packages from NuGet the error removed and Report Application work properly
Hope this will help ..!
Regards,
Gunjan