Boolean error from ObjectDataSource

4 posts, 0 answers
  1. Ranjit
    Ranjit avatar
    12 posts
    Member since:
    Oct 2011

    Posted 03 Nov 2014 Link to this post

    Okay Telerik. This is the kind of stuff that hurts my soul when I run into it. 

    Some pretty basic stuff (after I have to add connection strings to my devenv.exe.config in order to use entityframework in my data class for designer preview).

    I have a class, where I am loading data using EntityFramework in the constructor of this class. Currently, if I load an entity, and try to access a boolean value off of it, I receive a ridiculous error saying: 'Method not found: 'Boolean [NameSpace].[Entity].get_[PropertyName]().' This is not an issue of mis matched entities. If I literally comment out trying to access a boolean field, it works fine. As soon as I attempt to access a boolean value from a pulled entity, it gives me that error.

    I haven't run into this issue until today, and quite honestly this was working fine before today. I'd love some feedback because I'm completely dead in the water on this.
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 06 Nov 2014 Link to this post

    Hi Ranjit,

    As of Telerik Reporting Q2 2013 SP1 version 7.1.13.802 the EntityDataSource component supports both ObjectContext/DbContext - EntityDataSource Component. The article describes the required settings for passing a connection string from the designer, which allows you to use the Design preview without editing the devenv.exe.config file.

    If you need further help, please paste the data model code to check the settings.

    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.

     
  3. Ranjit
    Ranjit avatar
    12 posts
    Member since:
    Oct 2011

    Posted 13 Feb 2015 in reply to Stef Link to this post

    Well thanks for the information about the devenv.exe.config, however that wasn't my issue....

    My deployed code still throws the same exception (regarding the Boolean value). My post was regarding an entityframework model that I access in a objectContext for a report. When I pull the object, and access a boolean, it throws an exception saying that method does not exist ( 'Method not found: 'Boolean [NameSpace].[Entity].get_[PropertyName]().' )

    I know it exists, and I have no issue anywhere else using this EntityFramework model.

    The NonCompliance variable is the issue. If I pull the entity, but don't access the boolean, it works fine.

    it looks like this:

    public class tblCancellationMessage
        {
            public tblCancellationMessage();
     
            public string CancellationMessage { get; set; }
            public int Id { get; set; }
            public bool NonCompliance { get; set; }
        }

    Please help, as this seems like very basic functionality that doesn't work properly.

  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 16 Feb 2015 Link to this post

    Hello Ranjit,

    Please compare the settings now and before, and the applied changes to isolate the problem. Double-check also the deployed assemblies and if the model's assembly is updated.  On your development machine test to reconfigure reports after updating the model with the new property and test them in the integrated in VS Report Designer.

    In order to investigate the problem further, post the code of the data model and the settings for using this model in your report. the information will be used for creating a demo project at our end.

    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.

     
Back to Top