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

Designer Preview tab - connection string error?

3 Answers 230 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dewey
Top achievements
Rank 1
Dewey asked on 18 May 2012, 04:37 PM
I have Telerik Reporting internal build 6.0.12.504 but this also applies to the release build 6.0.12.215.  I have VS 2010 and .NET 4.0.

The report works fine at run-time but in the report designer when I click on the Preview tab I get the following error in red:

An error has occurred while processing Report 'Report1'.
An error has occurred while invoking data retrieval method. Try restarting Visual Studio.
---- Inner Exception -------
Exception has been thrown by the target of an invocation.
---- Inner Exception -------
No connection string by the name of 'MyContext' could be found in the application config file.

For my report I am using an ObjectDataSource that uses Entity Framework to retrieve data. In fact, I do have a connection string named 'MyContext' in the "app.config" file in my Reports project where the report designs, and report objects are. Am I seeing this error because Preview is not available when using an ObjectDataSource? 

A related question: is there a way to see the report data when in the report designer?

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 May 2012, 10:53 AM
Hello Dewey,

For retrieving data from Entity Framework our suggestion is to use the EntityDataSource Component. The EntityDataSource component enables data items to connect to an ADO.NET Entity Data Model.

In order to use the Report Designer and Report Wizard the Entity Data Model should be located in a separate class library. The connectionString to the database should be copied to the config file of the report class library for the Data Explorer and Preview to work.

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Jason
Top achievements
Rank 1
answered on 12 May 2017, 02:21 PM
I have done what you mentioned.  It works for a while then when I close Visual Studio and reopen it no longer can connect.  
0
Stef
Telerik team
answered on 15 May 2017, 02:43 PM
Hello Jason,

There is a known issue in newer Visual Studio versions and how types are loaded. In some cases types are loaded by Vs services and they are locked. The issue occurs when the reporting engine tries to re-load types for the started design-time support.

Restarting Visual Studio can resolve the issue temporary, but the recommended solution is to switch to the Standalone Report Designer, where the reporting engine controls how types are loaded. For more details and suggestions, please refer to EntityDataSource troubleshooting.

Regards,
Stef
Telerik by Progress
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
Dewey
Top achievements
Rank 1
Answers by
Steve
Telerik team
Jason
Top achievements
Rank 1
Stef
Telerik team
Share this question
or