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

3 posts, 0 answers
  1. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 01 Dec 2011 Link to this post

    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. Louis
    Louis avatar
    13 posts
    Member since:
    Aug 2011

    Posted 06 Dec 2011 Link to this post

    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
  3. DevCraft banner
  4. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 07 Dec 2011 Link to this post

    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!

Back to Top