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

Boolean error from ObjectDataSource

3 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ranjit
Top achievements
Rank 1
Ranjit asked on 03 Nov 2014, 10:42 PM
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.

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 06 Nov 2014, 02:17 PM
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.

 
0
Ranjit
Top achievements
Rank 1
answered on 13 Feb 2015, 05:10 PM
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.

0
Stef
Telerik team
answered on 16 Feb 2015, 04:48 PM
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.

 
Tags
General Discussions
Asked by
Ranjit
Top achievements
Rank 1
Answers by
Stef
Telerik team
Ranjit
Top achievements
Rank 1
Share this question
or