Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1079813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:55:43+00:00 2026-05-16T21:55:43+00:00

My question is similar to this one but I’m having some problems with the

  • 0

My question is similar to this one but I’m having some problems with the actual implementation.

I’ve got a report (.rdlc) in the business layer of a 3-tier app.

I’ve got an object in the BL (EmployeeManager) which has a GetEmployees(Expression as Expression(Of Func(Of Employee, Boolean))) As IQueryable(Of Employee) method.

As I didn’t want to try and pass a lambda in directly (at least not until I’ve got something working), I’ve created a ReportData class in the BL which wraps the GetEmployees() call and exposes the results as an IEnumerable(Of Employee) – which should be very simple. It doesn’t even have parameters at the moment.

Ok… So In my report, I’ve tried to add a new Data Source. I’ve picked a type of Object and located the ReportData class mentioned above. The wizard completes and adds a DataSources folder to the project inside which is some XML defining a <GenericObjectDataSource> and pointing at the Report class.

ReportData also appears in the Data Sources pane – It has a > next to it but when I expand it, it has no children.

What I don’t know how to do is USE the data source – It doesn’t seem to expose any methods/members (I haven’t even specified that it should call GetEmployees() yet!) and I certainly can’t see an IEnumerable(Of Employee) anywhere.

When I try to add a table to the report and it prompts me to select a Dataset, the ReportData Datasource is not shown in the Data source drop-down.

What am I missing? Can someone please point me in the right direction?

My simple ReportData object:

Namespace Reports
    Public Class ReportData

        Private Property EmployeeManager As Interfaces.IEmployeeManager

        Public Sub New()
            ''This sub is here in case it's an instantiation problem - I intend to use dependency injection when I've got this working properly.
            Me.EmployeeManager = New EmployeeManager
        End Sub

        Public Sub New(ByVal EmployeeManager As Interfaces.IEmployeeManager)
            Me.EmployeeManager = EmployeeManager
        End Sub

        Public Function GetEmployees() As IEnumerable(Of Employee)
            Return EmployeeManager.GetEmployees()
        End Function
    End Class
End Namespace

I’ve also found this which seems to indicate I’m following the correct steps but the properties don’t appear as expected

The public properties of the class now appear in the Data Sources window, where they can be dragged and dropped into the report.

This doesn’t happen – the properties never appear

EDIT: As pointed out by Alex, I need to use properties not just any methods. Please see Alex Esselfie’s answer below for clarification. This still hasn’t solved my problem but has got me a step closer…

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:55:44+00:00Added an answer on May 16, 2026 at 9:55 pm

    From your description and accompanying code, there are no properties in the ReportData class. If I reckon well, that class is supposed to be generating the IEnumerable you want to display on the report.

    If that’s the case, you’ll have to select the Employee class as the DataSource in the wizard. This will allow you to display the data on your report.

    I’ll work on a quick project and add it to this answer in a moment.


    Edit 1

    How to Bind a Class to a Report

    Visual Studio 2008

    1. Open the report in Design View.
    2. Select from the menu bar Data > Show Data Sources
    3. Click Add New Data Source on the Data Sources window.
    4. Select Object and click Next.
    5. Browse the solution tree and select the class you want to bind to.
      In your case, you bind to the Employee class.
    6. Click Next and then Finish.

    Visual Studio 2010

    1. Open the report in Design View.
    2. Select from the menu bar View > Report Data
    3. Click New > Dataset... on the Data Sources window.
    4. Enter a name for the dataset (e.g. Employee)
    5. Create a New Data source or select an existing data source.

      Creating a New Data source

      • Select Object and click Next.
      • Browse the solution tree and select the class(es) you want to bind to.
      • Click Finish.

    After binding a class to the report, go ahead and design your report as usual.


    Edit 2

    I uploaded a sample project for you. Here’s the link.
    If you need further clarification, please notify me so I give you a step by step procedure on how to replicate the project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is similar to this one , but I can simplify it some.
My question is similar to this one but none of the answers solve my
My question is similar to this one , but I would like to replicate
My question popped up a very similar question, this one . But the accepted
Rails 3.1, ActiveAdmin 0.3.4. My question is somewhat similar to this one but different
I have a question similar to This one . But I want to implement
I have asked a similar question to this one already but I think it
This question is similar to this one , but hopefully it will pick up
The question is similar to this one , but I cannot figure how to
I know this is a similar question to this one but before I head

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.