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

"Exception has been thrown by the target of an invocation" when creating an entity data source

2 Answers 290 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 01 Dec 2011, 08:02 AM
Hi,

I'm trying to create an EntityDataSource with the new report wizard, but I get a Popup with "Exception has been thrown by the target of an invocation"(Very usefull exception message by the way) before the wizard ends. I've the last version of telerik report(2011 Q3), and I've no other version of telerik reporting installed.

I've one c# class library project, and one other containing the EntityFramework and the generated POCO objects(+datacontext).

Here are some screenshot which show what I've done. I think I've done nothing special :/.

I need to have a first running report at leat friday(the 2.12.2011), so please help :(

Step1: Creating the report
http://dl.dropbox.com/u/368403/TelerikReport/Step1.png

Step 2: Clicking on Add New Data Source...
http://dl.dropbox.com/u/368403/TelerikReport/Step2.png

Step 3: Choosing Entity Data Source type
http://dl.dropbox.com/u/368403/TelerikReport/Step3.png

Step 4: Choosing my connection string(copied in the app.config file, from the app.config file of my EF project, so I now it works)
http://dl.dropbox.com/u/368403/TelerikReport/Step4.png

Step 5: Choosing my dataContext object(which is in another referenced project)
http://dl.dropbox.com/u/368403/TelerikReport/Step5.png

Step 6: Choosing the object context member(in my case, offers
http://dl.dropbox.com/u/368403/TelerikReport/Step6.png

Step 7: Get the wonderfull error!
http://dl.dropbox.com/u/368403/TelerikReport/Step7.png

After that, the data source has been created, but do not work, I see it in the bottom of the report, but it cannot be used anywhere, and if I go again on the  report wizard and select the data source, I've the same error than on the Step 7.

What is going wrong and what can I do NOW to get it working

2 Answers, 1 is accepted

Sort by
0
Louis
Top achievements
Rank 2
answered on 06 Dec 2011, 08:57 PM
I am having the same troubles. I created a class lib project added my model.
added a reference to it from my report project and i also keep getting the same error described in this thread.
Thanks

Louis
0
Peter
Telerik team
answered on 07 Dec 2011, 11:03 AM
Hello Louis,

The provided information is not sufficient to determine what is causing the unexpected generic error. Do you have copied the connection string to the report library config file?

I have attached a sample project that utilizes EntityDataSouce component. Give it a try and if you still experience any difficulties our suggestion is to open the DataExplorer and check for exceptions. 

Best wishes,
Peter
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Julien
Top achievements
Rank 1
Answers by
Louis
Top achievements
Rank 2
Peter
Telerik team
Share this question
or