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

Report Data Source Not Recognized at runtime

1 Answer 218 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kurt
Top achievements
Rank 1
Kurt asked on 04 Nov 2015, 08:20 PM

I have an ASP.NET MVC application.  I have the telerik reporting MVC report viewer installed.  I have the sample report displaying using the report viewer view that is packaged in the installer.

I created a separate class library to hold my reports, it is called MyClass.client.reports.  In is there is a reports folder and a report I created using the Visual Studio Designer.  It uses a SQL query, and the DataContext from my solution which it recognized when I created the report.

When I preview the report in Visual Studio it previews fine.  When I try to access the report at runtime I get the following error in the report viewer.  The connection string is in the AppConfig of another project which my report project references.  So my reports are in one project.  Controllers & views in a second project.  The data connection string is in the appconfig of the third project.  I don't understand why the report cannot resolve the data connection.

An error has occurred while processing Table 'table1': 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. ​

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 09 Nov 2015, 12:37 PM
Hello Kurt,

The named connection string used in the report should be present in the application configuration file of the application which contains the report viewer view. For more information, please refer to the Connection Strings and Configuration Files page.

Another option is to use a hard-coded connection string which will be saved inside the report itself. Using this approach, the report connection string will not depend on the content of the application configuration file.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Kurt
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or