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

Object Data Source Wizard Can't Recognize any of my objects

5 Answers 1013 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ibrahim
Top achievements
Rank 1
Ibrahim asked on 29 Aug 2016, 03:14 PM

I'm using Telerik Reports v10.0.16.113 with Visual Studio Update 3.

I'm facing an issue that is the Object Data Source Wizard doesn't discover any of my classes. it only show the classes inside the assemblies that I'm referencing in my solution.

My solution is multiple projects and I'm building Any CPU.

How can i resolve this issue?

 

 

5 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 30 Aug 2016, 01:47 PM
Hi Ibrahim,

Check if the projects with custom objects are referenced in the reports project and if those objects are of the type supported by ObjectDataSource component - Supported object types.

Also, double-check if  you use "Any CPU" for "Debug" builds. As Visual Studio is a 32-bit application, the report designer is restricted to x86 mode even on x64 platforms, which prevents the ObjectDataSource Wizard from discovering any types from x64 assemblies.

I hope this will help.


Regards,
Katia
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
0
Ibrahim
Top achievements
Rank 1
answered on 30 Aug 2016, 02:15 PM

Hi Katia,

My Solution is Building as "Any CPU". 

my reports should get the data from application service. below is a sample of it.

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Domain.Repositories;
using KanooIT.DynamicsTemplate.Mapping;
using KanooIT.DynamicsTemplate.Users;
using KanooIT.DynamicsTemplate.Users.Dto;
 
namespace KanooIT.DynamicsTemplate.Samples
{
    public class SampleAppService : ISampleAppService
    {
        private readonly IRepository<User,long> userRepository ;
        public SampleAppService(IRepository<User,long> userRepository)
        {
            this.userRepository = userRepository;
        }
 
        public List<UserListDto> GetAllUsers()
        {
            var users = userRepository.GetAllList();
 
            return new List<UserListDto>(
                users.MapTo<List<UserListDto>>()
                );
        }
    }
}

It's Required to call this function in run-time and bind the List<UserListDto> to the data source.

Thanks,

0
Katia
Telerik team
answered on 01 Sep 2016, 01:03 PM
Hi Ibrahim,

I have tested using the ObjectDataSource Wizard to connect to the sample data as described in your previous post and was able to set DataMember property to GetAllUsers() method. The objects are discovered by the wizard successfully - check this screenshot.

In case, the issue is different please send us the demo project with custom assemblies in a support ticket so we can test it locally.


Regards,
Katia
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
0
Yannick Turbang
Top achievements
Rank 1
answered on 11 Feb 2021, 11:44 AM
Hello, I have the problem which is explained regarding the build "x64" instead of "AnyCPU". If I put the project in "AnyCPU" I can select the right reference in the ObjectDataSource, on the other hand once the report is created I have to put the project back in "X64" but at this moment the report generates an error when l edit report see attached screenshot.
To edit the report I must put the report back in "AnyCPU" and recreate the reference of the ObjectDataSource. It is very restrictive to work. Is there a solution to be able to edit reports in "X64"?
0
Neli
Telerik team
answered on 19 Feb 2021, 02:30 PM

Hello Yannick,

The ObjectDataSource Wizard will list all available types from the current project and from all other referenced projects which includes all public, non-abstract, non-generic classes and structures organized in a hierarchical manner and grouped by namespace.

If you use the Visual Studio Report Designer have in mind that Visual Studio is a 32-bit application, so the designer is restricted to x86 mode even on x64 platforms, which prevents the ObjectDataSource Wizard from discovering any types from x64 assemblies. The solution is to use different platform configurations: for "Debug" builds it is best to use "Any CPU", while for "Release" builds you can use "x64" instead.
A similar issue has been discussed in our forums and you may find useful the suggested solutions in the forum thread: Custom Type/Class unavailable in Configure Object Data Source Wizard.

I would also suggest you to check the ObjectDataSource component troubleshooting help article to avoid issues when previwing reports that use ObjectDataSource.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Ibrahim
Top achievements
Rank 1
Answers by
Katia
Telerik team
Ibrahim
Top achievements
Rank 1
Yannick Turbang
Top achievements
Rank 1
Neli
Telerik team
Share this question
or