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

4 posts, 0 answers
  1. Ibrahim
    Ibrahim avatar
    3 posts
    Member since:
    Jun 2016

    Posted 29 Aug Link to this post

    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?

     

     

  2. Katia
    Admin
    Katia avatar
    309 posts

    Posted 30 Aug Link to this post

    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
  3. DevCraft banner
  4. Ibrahim
    Ibrahim avatar
    3 posts
    Member since:
    Jun 2016

    Posted 30 Aug in reply to Katia Link to this post

    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,

  5. Katia
    Admin
    Katia avatar
    309 posts

    Posted 01 Sep Link to this post

    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
Back to Top